Correctly deny late-bound lifetimes from parent in anon consts and TAITs

This commit is contained in:
Michael Goulet 2023-09-02 21:29:27 +00:00
parent ab45885dec
commit 52aff53812
18 changed files with 230 additions and 150 deletions

View file

@ -268,9 +268,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
// (*) -- not late-bound, won't change
}
Some(rbv::ResolvedArg::Error(_)) => {
bug!("only ty/ct should resolve as ResolvedArg::Error")
}
Some(rbv::ResolvedArg::Error(guar)) => ty::Region::new_error(tcx, guar),
None => {
self.re_infer(def, lifetime.ident.span).unwrap_or_else(|| {