Minor cleanup
This commit is contained in:
parent
37f9c7ff82
commit
ec4a9c6b2f
1 changed files with 5 additions and 6 deletions
|
|
@ -1010,17 +1010,16 @@ impl<'tcx> InterpretInterner<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'tcx> GlobalCtxt<'tcx> {
|
||||
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
/// Get the global TyCtxt.
|
||||
pub fn global_tcx<'a>(&'a self) -> TyCtxt<'a, 'tcx, 'tcx> {
|
||||
#[inline]
|
||||
pub fn global_tcx(self) -> TyCtxt<'a, 'gcx, 'gcx> {
|
||||
TyCtxt {
|
||||
gcx: self,
|
||||
interners: &self.global_interners
|
||||
gcx: self.gcx,
|
||||
interners: &self.gcx.global_interners,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
|
||||
pub fn alloc_generics(self, generics: ty::Generics) -> &'gcx ty::Generics {
|
||||
self.global_arenas.generics.alloc(generics)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue