Skip to content

Commit ec4a9c6

Browse files
committed
Minor cleanup
1 parent 37f9c7f commit ec4a9c6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/librustc/ty/context.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1010,17 +1010,16 @@ impl<'tcx> InterpretInterner<'tcx> {
10101010
}
10111011
}
10121012

1013-
impl<'tcx> GlobalCtxt<'tcx> {
1013+
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
10141014
/// Get the global TyCtxt.
1015-
pub fn global_tcx<'a>(&'a self) -> TyCtxt<'a, 'tcx, 'tcx> {
1015+
#[inline]
1016+
pub fn global_tcx(self) -> TyCtxt<'a, 'gcx, 'gcx> {
10161017
TyCtxt {
1017-
gcx: self,
1018-
interners: &self.global_interners
1018+
gcx: self.gcx,
1019+
interners: &self.gcx.global_interners,
10191020
}
10201021
}
1021-
}
10221022

1023-
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
10241023
pub fn alloc_generics(self, generics: ty::Generics) -> &'gcx ty::Generics {
10251024
self.global_arenas.generics.alloc(generics)
10261025
}

0 commit comments

Comments
 (0)