X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_ast_lowering%2Fsrc%2Fpat.rs;h=1af1633b5244badd53899e8002d189de5a4bfda3;hb=5e04567ac7fb2d1e35cc52a02d499b6027b58a76;hp=1ea76fdbfcbbbab5996de26b9a163f8229d37792;hpb=2b30ce04ac23aaea8d35502aa67079f1072cad2d;p=rust.git diff --git a/compiler/rustc_ast_lowering/src/pat.rs b/compiler/rustc_ast_lowering/src/pat.rs index 1ea76fdbfcb..1af1633b524 100644 --- a/compiler/rustc_ast_lowering/src/pat.rs +++ b/compiler/rustc_ast_lowering/src/pat.rs @@ -239,7 +239,7 @@ fn lower_pat_ident( ident: Ident, lower_sub: impl FnOnce(&mut Self) -> Option<&'hir hir::Pat<'hir>>, ) -> hir::PatKind<'hir> { - match self.resolver.get_partial_res(p.id).map(|d| d.base_res()) { + match self.resolver.get_partial_res(p.id).map(|d| d.expect_full_res()) { // `None` can occur in body-less function signatures res @ (None | Some(Res::Local(_))) => { let canonical_id = match res {