@@ -2119,7 +2119,7 @@ macro_rules! intern_method {
2119
2119
$alloc_method: ident,
2120
2120
$alloc_to_key: expr,
2121
2121
$alloc_to_ret: expr,
2122
- $needs_infer : expr) -> $ty: ty) => {
2122
+ $keep_in_local_tcx : expr) -> $ty: ty) => {
2123
2123
impl <' a, ' gcx, $lt_tcx> TyCtxt <' a, ' gcx, $lt_tcx> {
2124
2124
pub fn $method( self , v: $alloc) -> & $lt_tcx $ty {
2125
2125
{
@@ -2137,7 +2137,7 @@ macro_rules! intern_method {
2137
2137
// HACK(eddyb) Depend on flags being accurate to
2138
2138
// determine that all contents are in the global tcx.
2139
2139
// See comments on Lift for why we can't use that.
2140
- if !( $needs_infer ) ( & v) {
2140
+ if !( $keep_in_local_tcx ) ( & v) {
2141
2141
if !self . is_global( ) {
2142
2142
let v = unsafe {
2143
2143
mem:: transmute( v)
@@ -2165,7 +2165,7 @@ macro_rules! intern_method {
2165
2165
}
2166
2166
2167
2167
macro_rules! direct_interners {
2168
- ( $lt_tcx: tt, $( $name: ident: $method: ident( $needs_infer : expr) -> $ty: ty) ,+) => {
2168
+ ( $lt_tcx: tt, $( $name: ident: $method: ident( $keep_in_local_tcx : expr) -> $ty: ty) ,+) => {
2169
2169
$( impl <$lt_tcx> PartialEq for Interned <$lt_tcx, $ty> {
2170
2170
fn eq( & self , other: & Self ) -> bool {
2171
2171
self . 0 == other. 0
@@ -2180,7 +2180,10 @@ macro_rules! direct_interners {
2180
2180
}
2181
2181
}
2182
2182
2183
- intern_method!( $lt_tcx, $name: $method( $ty, alloc, |x| x, |x| x, $needs_infer) -> $ty) ; ) +
2183
+ intern_method!(
2184
+ $lt_tcx,
2185
+ $name: $method( $ty, alloc, |x| x, |x| x, $keep_in_local_tcx) -> $ty
2186
+ ) ; ) +
2184
2187
}
2185
2188
}
2186
2189
0 commit comments