Note that from_res panics on errors

This commit is contained in:
Joshua Nelson 2020-08-25 22:01:01 -04:00 committed by GitHub
parent bb351defba
commit d3c581751b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1032,6 +1032,7 @@ impl Disambiguator {
}
}
/// WARNING: panics on `Res::Err`
fn from_res(res: Res) -> Self {
match res {
Res::Def(kind, _) => Disambiguator::Kind(kind),