1
Fork 0

Require impl Trait in associated types to appear in method signatures

This commit is contained in:
Oli Scherer 2023-04-17 10:19:41 +00:00
parent 699a862a3d
commit f08b517597
20 changed files with 242 additions and 53 deletions

View file

@ -2520,7 +2520,7 @@ pub fn is_impl_trait_defn(tcx: TyCtxt<'_>, def_id: DefId) -> Option<LocalDefId>
hir::OpaqueTyOrigin::FnReturn(parent) | hir::OpaqueTyOrigin::AsyncFn(parent) => {
Some(parent)
}
hir::OpaqueTyOrigin::TyAlias => None,
hir::OpaqueTyOrigin::TyAlias { .. } => None,
};
}
}

View file

@ -32,7 +32,7 @@ impl<'tcx> TyCtxt<'tcx> {
///
/// This should only be used outside of type inference. For example,
/// it assumes that normalization will succeed.
#[tracing::instrument(level = "debug", skip(self, param_env))]
#[tracing::instrument(level = "debug", skip(self, param_env), ret)]
pub fn normalize_erasing_regions<T>(self, param_env: ty::ParamEnv<'tcx>, value: T) -> T
where
T: TypeFoldable<TyCtxt<'tcx>>,