Skip to content

Commit b2ae3f2

Browse files
committed
Remove the $lt_tcx parameter from direct_interners!.
It's not necessary.
1 parent 475e131 commit b2ae3f2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/librustc/ty/context.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -2155,23 +2155,23 @@ impl<'tcx> Borrow<[Goal<'tcx>]> for Interned<'tcx, List<Goal<'tcx>>> {
21552155
}
21562156

21572157
macro_rules! direct_interners {
2158-
($lt_tcx:tt, $($name:ident: $method:ident($ty:ty)),+) => {
2159-
$(impl<$lt_tcx> PartialEq for Interned<$lt_tcx, $ty> {
2158+
($($name:ident: $method:ident($ty:ty)),+) => {
2159+
$(impl<'tcx> PartialEq for Interned<'tcx, $ty> {
21602160
fn eq(&self, other: &Self) -> bool {
21612161
self.0 == other.0
21622162
}
21632163
}
21642164

2165-
impl<$lt_tcx> Eq for Interned<$lt_tcx, $ty> {}
2165+
impl<'tcx> Eq for Interned<'tcx, $ty> {}
21662166

2167-
impl<$lt_tcx> Hash for Interned<$lt_tcx, $ty> {
2167+
impl<'tcx> Hash for Interned<'tcx, $ty> {
21682168
fn hash<H: Hasher>(&self, s: &mut H) {
21692169
self.0.hash(s)
21702170
}
21712171
}
21722172

2173-
impl<$lt_tcx> TyCtxt<$lt_tcx> {
2174-
pub fn $method(self, v: $ty) -> &$lt_tcx $ty {
2173+
impl<'tcx> TyCtxt<'tcx> {
2174+
pub fn $method(self, v: $ty) -> &'tcx $ty {
21752175
self.interners.$name.intern_ref(&v, || {
21762176
Interned(self.interners.arena.alloc(v))
21772177
}).0
@@ -2184,7 +2184,7 @@ pub fn keep_local<'tcx, T: ty::TypeFoldable<'tcx>>(x: &T) -> bool {
21842184
x.has_type_flags(ty::TypeFlags::KEEP_IN_LOCAL_TCX)
21852185
}
21862186

2187-
direct_interners!('tcx,
2187+
direct_interners!(
21882188
region: mk_region(RegionKind),
21892189
goal: mk_goal(GoalKind<'tcx>),
21902190
const_: mk_const(Const<'tcx>)

0 commit comments

Comments
 (0)