diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-01 16:07:57 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-10-01 16:07:57 +1000 |
| commit | b2ae3f2a6b4d6e8c6a02173aa7db9a6370c3bc9c (patch) | |
| tree | 1f622eccd3b1b5860461e4a526d0314fe979ec22 /src | |
| parent | 475e131b3e877d3926b5869cde5b548825f0ceb1 (diff) | |
Remove the `$lt_tcx` parameter from `direct_interners!`.
It's not necessary.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/ty/context.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index b520e66fc49..740e916dd5c 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -2155,23 +2155,23 @@ impl<'tcx> Borrow<[Goal<'tcx>]> for Interned<'tcx, List<Goal<'tcx>>> { } macro_rules! direct_interners { - ($lt_tcx:tt, $($name:ident: $method:ident($ty:ty)),+) => { - $(impl<$lt_tcx> PartialEq for Interned<$lt_tcx, $ty> { + ($($name:ident: $method:ident($ty:ty)),+) => { + $(impl<'tcx> PartialEq for Interned<'tcx, $ty> { fn eq(&self, other: &Self) -> bool { self.0 == other.0 } } - impl<$lt_tcx> Eq for Interned<$lt_tcx, $ty> {} + impl<'tcx> Eq for Interned<'tcx, $ty> {} - impl<$lt_tcx> Hash for Interned<$lt_tcx, $ty> { + impl<'tcx> Hash for Interned<'tcx, $ty> { fn hash<H: Hasher>(&self, s: &mut H) { self.0.hash(s) } } - impl<$lt_tcx> TyCtxt<$lt_tcx> { - pub fn $method(self, v: $ty) -> &$lt_tcx $ty { + impl<'tcx> TyCtxt<'tcx> { + pub fn $method(self, v: $ty) -> &'tcx $ty { self.interners.$name.intern_ref(&v, || { Interned(self.interners.arena.alloc(v)) }).0 @@ -2184,7 +2184,7 @@ pub fn keep_local<'tcx, T: ty::TypeFoldable<'tcx>>(x: &T) -> bool { x.has_type_flags(ty::TypeFlags::KEEP_IN_LOCAL_TCX) } -direct_interners!('tcx, +direct_interners!( region: mk_region(RegionKind), goal: mk_goal(GoalKind<'tcx>), const_: mk_const(Const<'tcx>) |
