@@ -2119,7 +2119,7 @@ macro_rules! intern_method {
21192119 $alloc_method: ident,
21202120 $alloc_to_key: expr,
21212121 $alloc_to_ret: expr,
2122- $needs_infer : expr) -> $ty: ty) => {
2122+ $keep_in_local_tcx : expr) -> $ty: ty) => {
21232123 impl <' a, ' gcx, $lt_tcx> TyCtxt <' a, ' gcx, $lt_tcx> {
21242124 pub fn $method( self , v: $alloc) -> & $lt_tcx $ty {
21252125 {
@@ -2137,7 +2137,7 @@ macro_rules! intern_method {
21372137 // HACK(eddyb) Depend on flags being accurate to
21382138 // determine that all contents are in the global tcx.
21392139 // See comments on Lift for why we can't use that.
2140- if !( $needs_infer ) ( & v) {
2140+ if !( $keep_in_local_tcx ) ( & v) {
21412141 if !self . is_global( ) {
21422142 let v = unsafe {
21432143 mem:: transmute( v)
@@ -2165,7 +2165,7 @@ macro_rules! intern_method {
21652165}
21662166
21672167macro_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) ,+) => {
21692169 $( impl <$lt_tcx> PartialEq for Interned <$lt_tcx, $ty> {
21702170 fn eq( & self , other: & Self ) -> bool {
21712171 self . 0 == other. 0
@@ -2180,7 +2180,10 @@ macro_rules! direct_interners {
21802180 }
21812181 }
21822182
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+ ) ; ) +
21842187 }
21852188}
21862189
0 commit comments