Rename mk_infer to mk_ty_infer

Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
This commit is contained in:
Gabriel Smith 2019-02-28 23:02:32 -05:00 committed by varkor
parent 7bf175f30c
commit bd2fa222c0
4 changed files with 8 additions and 8 deletions

View file

@ -72,7 +72,7 @@ impl<'a, 'gcx, 'tcx> TypeFreshener<'a, 'gcx, 'tcx> {
Entry::Vacant(entry) => {
let index = self.freshen_count;
self.freshen_count += 1;
let t = self.infcx.tcx.mk_infer(freshener(index));
let t = self.infcx.tcx.mk_ty_infer(freshener(index));
entry.insert(t);
t
}

View file

@ -1248,7 +1248,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
let sig = if let ty::Tuple(inputs) = inputs.sty {
tcx.mk_fn_sig(
inputs.iter().map(|k| k.expect_ty()),
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
false,
hir::Unsafety::Normal,
::rustc_target::spec::abi::Abi::Rust
@ -1256,7 +1256,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
} else {
tcx.mk_fn_sig(
::std::iter::once(inputs),
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
false,
hir::Unsafety::Normal,
::rustc_target::spec::abi::Abi::Rust

View file

@ -2652,7 +2652,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
#[inline]
pub fn mk_ty_var(self, v: TyVid) -> Ty<'tcx> {
self.mk_infer(TyVar(v))
self.mk_ty_infer(TyVar(v))
}
#[inline]
@ -2665,16 +2665,16 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
#[inline]
pub fn mk_int_var(self, v: IntVid) -> Ty<'tcx> {
self.mk_infer(IntVar(v))
self.mk_ty_infer(IntVar(v))
}
#[inline]
pub fn mk_float_var(self, v: FloatVid) -> Ty<'tcx> {
self.mk_infer(FloatVar(v))
self.mk_ty_infer(FloatVar(v))
}
#[inline]
pub fn mk_infer(self, it: InferTy) -> Ty<'tcx> {
pub fn mk_ty_infer(self, it: InferTy) -> Ty<'tcx> {
self.mk_ty(Infer(it))
}

View file

@ -516,7 +516,7 @@ pub fn object_region_bounds<'a, 'gcx, 'tcx>(
// Since we don't actually *know* the self type for an object,
// this "open(err)" serves as a kind of dummy standin -- basically
// a placeholder type.
let open_ty = tcx.mk_infer(ty::FreshTy(0));
let open_ty = tcx.mk_ty_infer(ty::FreshTy(0));
let predicates = existential_predicates.iter().filter_map(|predicate| {
if let ty::ExistentialPredicate::Projection(_) = *predicate.skip_binder() {