Skip to content

Commit bd2fa22

Browse files
yodaldevoidvarkor
authored andcommitted
Rename mk_infer to mk_ty_infer
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
1 parent 7bf175f commit bd2fa22

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/librustc/infer/freshen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'a, 'gcx, 'tcx> TypeFreshener<'a, 'gcx, 'tcx> {
7272
Entry::Vacant(entry) => {
7373
let index = self.freshen_count;
7474
self.freshen_count += 1;
75-
let t = self.infcx.tcx.mk_infer(freshener(index));
75+
let t = self.infcx.tcx.mk_ty_infer(freshener(index));
7676
entry.insert(t);
7777
t
7878
}

src/librustc/traits/error_reporting.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,15 +1248,15 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
12481248
let sig = if let ty::Tuple(inputs) = inputs.sty {
12491249
tcx.mk_fn_sig(
12501250
inputs.iter().map(|k| k.expect_ty()),
1251-
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
1251+
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
12521252
false,
12531253
hir::Unsafety::Normal,
12541254
::rustc_target::spec::abi::Abi::Rust
12551255
)
12561256
} else {
12571257
tcx.mk_fn_sig(
12581258
::std::iter::once(inputs),
1259-
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
1259+
tcx.mk_ty_infer(ty::TyVar(ty::TyVid { index: 0 })),
12601260
false,
12611261
hir::Unsafety::Normal,
12621262
::rustc_target::spec::abi::Abi::Rust

src/librustc/ty/context.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
26522652

26532653
#[inline]
26542654
pub fn mk_ty_var(self, v: TyVid) -> Ty<'tcx> {
2655-
self.mk_infer(TyVar(v))
2655+
self.mk_ty_infer(TyVar(v))
26562656
}
26572657

26582658
#[inline]
@@ -2665,16 +2665,16 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
26652665

26662666
#[inline]
26672667
pub fn mk_int_var(self, v: IntVid) -> Ty<'tcx> {
2668-
self.mk_infer(IntVar(v))
2668+
self.mk_ty_infer(IntVar(v))
26692669
}
26702670

26712671
#[inline]
26722672
pub fn mk_float_var(self, v: FloatVid) -> Ty<'tcx> {
2673-
self.mk_infer(FloatVar(v))
2673+
self.mk_ty_infer(FloatVar(v))
26742674
}
26752675

26762676
#[inline]
2677-
pub fn mk_infer(self, it: InferTy) -> Ty<'tcx> {
2677+
pub fn mk_ty_infer(self, it: InferTy) -> Ty<'tcx> {
26782678
self.mk_ty(Infer(it))
26792679
}
26802680

src/librustc/ty/wf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ pub fn object_region_bounds<'a, 'gcx, 'tcx>(
516516
// Since we don't actually *know* the self type for an object,
517517
// this "open(err)" serves as a kind of dummy standin -- basically
518518
// a placeholder type.
519-
let open_ty = tcx.mk_infer(ty::FreshTy(0));
519+
let open_ty = tcx.mk_ty_infer(ty::FreshTy(0));
520520

521521
let predicates = existential_predicates.iter().filter_map(|predicate| {
522522
if let ty::ExistentialPredicate::Projection(_) = *predicate.skip_binder() {

0 commit comments

Comments
 (0)