Rollup merge of #97927 - cjgillot:issue-97836, r=petrochenkov
Do not introduce bindings for types and consts in HRTB. Fixes https://github.com/rust-lang/rust/issues/97836 r? `@petrochenkov`
This commit is contained in:
commit
c2355a615d
3 changed files with 27 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue