Skip to content

Commit d3bbce7

Browse files
committed
bring TyCtxt into scope
1 parent 9421141 commit d3bbce7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc/ty/instance.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use hir::def_id::DefId;
12-
use ty::{self, Ty, TypeFoldable, Substs};
12+
use ty::{self, Ty, TypeFoldable, Substs, TyCtxt};
1313
use util::ppaux;
1414

1515
use std::fmt;
@@ -57,12 +57,12 @@ impl<'tcx> InstanceDef<'tcx> {
5757
}
5858

5959
#[inline]
60-
pub fn def_ty<'a>(&self, tcx: ty::TyCtxt<'a, 'tcx, 'tcx>) -> Ty<'tcx> {
60+
pub fn def_ty<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Ty<'tcx> {
6161
tcx.type_of(self.def_id())
6262
}
6363

6464
#[inline]
65-
pub fn attrs<'a>(&self, tcx: ty::TyCtxt<'a, 'tcx, 'tcx>) -> ty::Attributes<'tcx> {
65+
pub fn attrs<'a>(&self, tcx: TyCtxt<'a, 'tcx, 'tcx>) -> ty::Attributes<'tcx> {
6666
tcx.get_attrs(self.def_id())
6767
}
6868
}
@@ -103,7 +103,7 @@ impl<'a, 'b, 'tcx> Instance<'tcx> {
103103
Instance { def: InstanceDef::Item(def_id), substs: substs }
104104
}
105105

106-
pub fn mono(tcx: ty::TyCtxt<'a, 'tcx, 'b>, def_id: DefId) -> Instance<'tcx> {
106+
pub fn mono(tcx: TyCtxt<'a, 'tcx, 'b>, def_id: DefId) -> Instance<'tcx> {
107107
Instance::new(def_id, tcx.global_tcx().empty_substs_for_def_id(def_id))
108108
}
109109

0 commit comments

Comments
 (0)