Skip to content

Commit f04b8fe

Browse files
committed
rename needs_infer to has_infer
1 parent e3ccd4b commit f04b8fe

File tree

34 files changed

+59
-58
lines changed

34 files changed

+59
-58
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub(crate) fn get_function_sig<'tcx>(
7070
default_call_conv: CallConv,
7171
inst: Instance<'tcx>,
7272
) -> Signature {
73-
assert!(!inst.substs.needs_infer());
73+
assert!(!inst.substs.has_infer());
7474
clif_sig_from_fn_abi(
7575
tcx,
7676
default_call_conv,

compiler/rustc_codegen_cranelift/src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub(crate) fn codegen_fn<'tcx>(
2828
module: &mut dyn Module,
2929
instance: Instance<'tcx>,
3030
) -> CodegenedFunction {
31-
debug_assert!(!instance.substs.needs_infer());
31+
debug_assert!(!instance.substs.has_infer());
3232

3333
let symbol_name = tcx.symbol_name(instance).name.to_string();
3434
let _timer = tcx.prof.generic_activity_with_arg("codegen fn", &*symbol_name);

compiler/rustc_codegen_gcc/src/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::context::CodegenCx;
1717
pub fn get_fn<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, instance: Instance<'tcx>) -> Function<'gcc> {
1818
let tcx = cx.tcx();
1919

20-
assert!(!instance.substs.needs_infer());
20+
assert!(!instance.substs.has_infer());
2121
assert!(!instance.substs.has_escaping_bound_vars());
2222

2323
let sym = tcx.symbol_name(instance).name;

compiler/rustc_codegen_gcc/src/mono_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl<'gcc, 'tcx> PreDefineMethods<'tcx> for CodegenCx<'gcc, 'tcx> {
3131

3232
#[cfg_attr(not(feature="master"), allow(unused_variables))]
3333
fn predefine_fn(&self, instance: Instance<'tcx>, linkage: Linkage, visibility: Visibility, symbol_name: &str) {
34-
assert!(!instance.substs.needs_infer());
34+
assert!(!instance.substs.has_infer());
3535

3636
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());
3737
self.linkage.set(base::linkage_to_gcc(linkage));

compiler/rustc_codegen_llvm/src/callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn get_fn<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) ->
2727

2828
debug!("get_fn(instance={:?})", instance);
2929

30-
assert!(!instance.substs.needs_infer());
30+
assert!(!instance.substs.has_infer());
3131
assert!(!instance.substs.has_escaping_bound_vars());
3232

3333
if let Some(&llfn) = cx.instances.borrow().get(&instance) {

compiler/rustc_codegen_llvm/src/mono_item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl<'tcx> PreDefineMethods<'tcx> for CodegenCx<'_, 'tcx> {
4848
visibility: Visibility,
4949
symbol_name: &str,
5050
) {
51-
assert!(!instance.substs.needs_infer());
51+
assert!(!instance.substs.has_infer());
5252

5353
let fn_abi = self.fn_abi_of_instance(instance, ty::List::empty());
5454
let lldecl = self.declare_fn(symbol_name, fn_abi);

compiler/rustc_codegen_ssa/src/mir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
152152
cx: &'a Bx::CodegenCx,
153153
instance: Instance<'tcx>,
154154
) {
155-
assert!(!instance.substs.needs_infer());
155+
assert!(!instance.substs.has_infer());
156156

157157
let llfn = cx.get_fn(instance);
158158

compiler/rustc_hir_analysis/src/astconv/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
23182318
let infcx = match self.infcx() {
23192319
Some(infcx) => infcx,
23202320
None => {
2321-
assert!(!self_ty.needs_infer());
2321+
assert!(!self_ty.has_infer());
23222322
infcx_ = tcx.infer_ctxt().ignoring_regions().build();
23232323
&infcx_
23242324
}
@@ -2489,7 +2489,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
24892489
let infcx = if let Some(infcx) = self.infcx() {
24902490
infcx
24912491
} else {
2492-
assert!(!qself_ty.needs_infer());
2492+
assert!(!qself_ty.has_infer());
24932493
infcx_ = tcx.infer_ctxt().build();
24942494
&infcx_
24952495
};

compiler/rustc_hir_analysis/src/check/wfcheck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ fn check_type_defn<'tcx>(tcx: TyCtxt<'tcx>, item: &hir::Item<'tcx>, all_sized: b
10271027
packed && {
10281028
let ty = tcx.type_of(variant.fields.raw.last().unwrap().did).subst_identity();
10291029
let ty = tcx.erase_regions(ty);
1030-
if ty.needs_infer() {
1030+
if ty.has_infer() {
10311031
tcx.sess
10321032
.delay_span_bug(item.span, &format!("inference variables in {:?}", ty));
10331033
// Just treat unresolved type expression as if it needs drop.

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ fn check_predicates<'tcx>(
366366
wf::obligations(infcx, tcx.param_env(impl1_def_id), impl1_def_id, 0, arg, span)
367367
.unwrap();
368368

369-
assert!(!obligations.needs_infer());
369+
assert!(!obligations.has_infer());
370370
impl2_predicates
371371
.extend(traits::elaborate(tcx, obligations).map(|obligation| obligation.predicate))
372372
}

0 commit comments

Comments
 (0)