1
Fork 0

Make things actually work

This commit is contained in:
Michael Goulet 2022-12-14 23:53:05 +00:00
parent eff2cb7760
commit 52f82354dc
5 changed files with 151 additions and 93 deletions

View file

@ -2505,7 +2505,13 @@ impl<'a: 'ast, 'b, 'ast, 'tcx> LateResolutionVisitor<'a, 'b, 'ast, 'tcx> {
let res = match kind {
ItemRibKind(..) | AssocItemRibKind => Res::Def(def_kind, def_id.to_def_id()),
NormalRibKind => Res::Err, /* FIXME(non_lifetime_binder): Resolve this to "late" */
NormalRibKind => {
if self.r.session.features_untracked().non_lifetime_binders {
Res::Def(def_kind, def_id.to_def_id())
} else {
Res::Err
}
}
_ => span_bug!(param.ident.span, "Unexpected rib kind {:?}", kind),
};
self.r.record_partial_res(param.id, PartialRes::new(res));