diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-09 21:30:18 +0200 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-06-09 21:49:14 +0200 |
| commit | 4d871a25bf96e577992218ac69b449e3648166be (patch) | |
| tree | e5162a0e7acd0f95586659e20ff40bc06781455e /compiler/rustc_resolve/src | |
| parent | 7fe2c4b00dfbc33643e1af4b293eb057306a8339 (diff) | |
| download | rust-4d871a25bf96e577992218ac69b449e3648166be.tar.gz rust-4d871a25bf96e577992218ac69b449e3648166be.zip | |
Do not introduce bindings for types and consts in HRTB.
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/late.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/late.rs b/compiler/rustc_resolve/src/late.rs index 771eeee965b..45a5adb90cf 100644 --- a/compiler/rustc_resolve/src/late.rs +++ b/compiler/rustc_resolve/src/late.rs @@ -1981,7 +1981,12 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> { continue; } }; - let res = Res::Def(def_kind, def_id.to_def_id()); + + let res = match kind { + ItemRibKind(..) | AssocItemRibKind => Res::Def(def_kind, def_id.to_def_id()), + NormalRibKind => Res::Err, + _ => bug!("Unexpected rib kind {:?}", kind), + }; self.r.record_partial_res(param.id, PartialRes::new(res)); rib.bindings.insert(ident, res); } |
