1
Fork 0

Rollup merge of #91878 - LegionMammal978:less-inband-infer, r=Aaron1011

Remove `in_band_lifetimes` from `rustc_infer`

See #91867 for more information.

This crate actually had a typo `'ctx` in one of its functions:
```diff
-pub fn same_type_modulo_infer(a: Ty<'tcx>, b: Ty<'ctx>) -> bool {
+pub fn same_type_modulo_infer<'tcx>(a: Ty<'tcx>, b: Ty<'tcx>) -> bool {
```
Also, I wasn't entirely sure about the lifetimes in `suggest_new_region_bound`:
```diff
 pub fn suggest_new_region_bound(
-    tcx: TyCtxt<'tcx>,
+    tcx: TyCtxt<'_>,
     err: &mut DiagnosticBuilder<'_>,
     fn_returns: Vec<&rustc_hir::Ty<'_>>,
```
Should all of those lifetimes really be distinct?
This commit is contained in:
Matthias Krüger 2021-12-19 17:38:33 +01:00 committed by GitHub
commit d576f7d42d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 48 additions and 49 deletions

View file

@ -80,7 +80,7 @@ pub struct ProjectionCacheKey<'tcx> {
ty: ty::ProjectionTy<'tcx>,
}
impl ProjectionCacheKey<'tcx> {
impl<'tcx> ProjectionCacheKey<'tcx> {
pub fn new(ty: ty::ProjectionTy<'tcx>) -> Self {
Self { ty }
}