diff options
Diffstat (limited to 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/canonical/canonicalizer.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/freshen.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/outlives/obligations.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/resolve.rs | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs index e6e1bc0393f..c29f652034f 100644 --- a/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs +++ b/compiler/rustc_infer/src/infer/canonical/canonicalizer.rs @@ -564,12 +564,12 @@ impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> { let _inside_canonical_ctxt_guard = infcx.set_canonicalization_ctxt(); let needs_canonical_flags = if canonicalize_region_mode.any() { - TypeFlags::NEEDS_INFER | + TypeFlags::HAS_INFER | TypeFlags::HAS_FREE_REGIONS | // `HAS_RE_PLACEHOLDER` implies `HAS_FREE_REGIONS` TypeFlags::HAS_TY_PLACEHOLDER | TypeFlags::HAS_CT_PLACEHOLDER } else { - TypeFlags::NEEDS_INFER + TypeFlags::HAS_INFER | TypeFlags::HAS_RE_PLACEHOLDER | TypeFlags::HAS_TY_PLACEHOLDER | TypeFlags::HAS_CT_PLACEHOLDER @@ -600,7 +600,7 @@ impl<'cx, 'tcx> Canonicalizer<'cx, 'tcx> { // Once we have canonicalized `out_value`, it should not // contain anything that ties it to this inference context // anymore. - debug_assert!(!out_value.needs_infer() && !out_value.has_placeholders()); + debug_assert!(!out_value.has_infer() && !out_value.has_placeholders()); let canonical_variables = tcx.mk_canonical_var_infos(&canonicalizer.universe_canonicalized_variables()); diff --git a/compiler/rustc_infer/src/infer/freshen.rs b/compiler/rustc_infer/src/infer/freshen.rs index d89f63e5c53..0219167f6e5 100644 --- a/compiler/rustc_infer/src/infer/freshen.rs +++ b/compiler/rustc_infer/src/infer/freshen.rs @@ -127,7 +127,7 @@ impl<'a, 'tcx> TypeFolder<TyCtxt<'tcx>> for TypeFreshener<'a, 'tcx> { #[inline] fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> { - if !t.needs_infer() && !t.has_erasable_regions() { + if !t.has_infer() && !t.has_erasable_regions() { t } else { match *t.kind() { diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 1cd09cde0fc..1cfdb791cd6 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1327,7 +1327,7 @@ impl<'tcx> InferCtxt<'tcx> { where T: TypeFoldable<TyCtxt<'tcx>>, { - if !value.needs_infer() { + if !value.has_infer() { return value; // Avoid duplicated subst-folding. } let mut r = InferenceLiteralEraser { tcx: self.tcx }; @@ -1365,7 +1365,7 @@ impl<'tcx> InferCtxt<'tcx> { pub fn fully_resolve<T: TypeFoldable<TyCtxt<'tcx>>>(&self, value: T) -> FixupResult<'tcx, T> { let value = resolve::fully_resolve(self, value); assert!( - value.as_ref().map_or(true, |value| !value.needs_infer()), + value.as_ref().map_or(true, |value| !value.has_infer()), "`{value:?}` is not fully resolved" ); value diff --git a/compiler/rustc_infer/src/infer/outlives/obligations.rs b/compiler/rustc_infer/src/infer/outlives/obligations.rs index 2f5e2e417a6..d3f7eeff997 100644 --- a/compiler/rustc_infer/src/infer/outlives/obligations.rs +++ b/compiler/rustc_infer/src/infer/outlives/obligations.rs @@ -347,7 +347,7 @@ where let is_opaque = alias_ty.kind(self.tcx) == ty::Opaque; if approx_env_bounds.is_empty() && trait_bounds.is_empty() - && (alias_ty.needs_infer() || is_opaque) + && (alias_ty.has_infer() || is_opaque) { debug!("no declared bounds"); let opt_variances = is_opaque.then(|| self.tcx.variances_of(alias_ty.def_id)); diff --git a/compiler/rustc_infer/src/infer/resolve.rs b/compiler/rustc_infer/src/infer/resolve.rs index 4f49f416507..3c41e8b3783 100644 --- a/compiler/rustc_infer/src/infer/resolve.rs +++ b/compiler/rustc_infer/src/infer/resolve.rs @@ -213,7 +213,7 @@ impl<'a, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for FullTypeResolver<'a, 'tcx> { } fn try_fold_ty(&mut self, t: Ty<'tcx>) -> Result<Ty<'tcx>, Self::Error> { - if !t.needs_infer() { + if !t.has_infer() { Ok(t) // micro-optimize -- if there is nothing in this type that this fold affects... } else { let t = self.infcx.shallow_resolve(t); @@ -243,7 +243,7 @@ impl<'a, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for FullTypeResolver<'a, 'tcx> { } fn try_fold_const(&mut self, c: ty::Const<'tcx>) -> Result<ty::Const<'tcx>, Self::Error> { - if !c.needs_infer() { + if !c.has_infer() { Ok(c) // micro-optimize -- if there is nothing in this const that this fold affects... } else { let c = self.infcx.shallow_resolve(c); |
