1
Fork 0

Rollup merge of #91984 - Aaron1011:rustc-middle-lifetime, r=oli-obk

Remove `in_band_lifetimes` from `rustc_middle`

See #91867

This was mostly straightforward. In several places, I take advantage
of the fact that lifetimes are non-hygenic: a macro declares the
'tcx' lifetime, which is then used in types passed in as macro
arguments.
This commit is contained in:
Matthias Krüger 2021-12-19 10:45:51 +01:00 committed by GitHub
commit 4d5ffc4870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 122 additions and 111 deletions

View file

@ -852,7 +852,7 @@ pub trait ToPredicate<'tcx> {
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx>;
}
impl ToPredicate<'tcx> for Binder<'tcx, PredicateKind<'tcx>> {
impl<'tcx> ToPredicate<'tcx> for Binder<'tcx, PredicateKind<'tcx>> {
#[inline(always)]
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
tcx.mk_predicate(self)
@ -1418,7 +1418,7 @@ impl<'tcx> ParamEnv<'tcx> {
// FIXME(ecstaticmorse): Audit all occurrences of `without_const().to_predicate(tcx)` to ensure that
// the constness of trait bounds is being propagated correctly.
impl PolyTraitRef<'tcx> {
impl<'tcx> PolyTraitRef<'tcx> {
#[inline]
pub fn with_constness(self, constness: BoundConstness) -> PolyTraitPredicate<'tcx> {
self.map_bound(|trait_ref| ty::TraitPredicate {