1
Fork 0

Rollup merge of #97292 - compiler-errors:tcxify-rustc, r=davidtwco

Lifetime variance fixes for rustc

#97287 migrates rustc to a `Ty` type that is invariant over its lifetime `'tcx`, so I need to fix a bunch of places that assume that `Ty<'a>` and `Ty<'b>` can be unified by shortening both to some common lifetime.

This is doable, since many lifetimes are already `'tcx`, so all this PR does is be a bit more explicit that elided lifetimes are actually `'tcx`.

Split out from #97287 so the compiler team can review independently.
This commit is contained in:
Dylan DPC 2022-05-23 15:11:04 +02:00 committed by GitHub
commit f4bf64c3f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 92 additions and 86 deletions

View file

@ -98,7 +98,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
&self,
anon_region: Region<'tcx>,
replace_region: Region<'tcx>,
) -> Option<AnonymousParamInfo<'_>> {
) -> Option<AnonymousParamInfo<'tcx>> {
find_param_with_region(self.tcx(), anon_region, replace_region)
}