about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-05-31 13:42:13 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2024-06-05 09:16:55 +0000
commit78706740d57d54a6da8abc8eda148c3bcdb64d40 (patch)
tree17be699b5bde241ca31ba18be87b6c6492ac4f7b
parent6a2e15a6f08fa1869cd9aacb89c7b2d033c54e65 (diff)
downloadrust-78706740d57d54a6da8abc8eda148c3bcdb64d40.tar.gz
rust-78706740d57d54a6da8abc8eda148c3bcdb64d40.zip
Remove `allows_infer` now that every use of it is delegated to `HirTyLowerer`
-rw-r--r--compiler/rustc_hir_analysis/src/collect.rs4
-rw-r--r--compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs3
-rw-r--r--compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs4
3 files changed, 0 insertions, 11 deletions
diff --git a/compiler/rustc_hir_analysis/src/collect.rs b/compiler/rustc_hir_analysis/src/collect.rs
index f6e5aeb5396..f5bcbf852bd 100644
--- a/compiler/rustc_hir_analysis/src/collect.rs
+++ b/compiler/rustc_hir_analysis/src/collect.rs
@@ -374,10 +374,6 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
         self.item_def_id
     }
 
-    fn allow_infer(&self) -> bool {
-        false
-    }
-
     fn re_infer(
         &self,
         _: Option<&ty::GenericParamDef>,
diff --git a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
index 8f498fcdf36..87c34ac535f 100644
--- a/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
+++ b/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
@@ -90,9 +90,6 @@ pub trait HirTyLowerer<'tcx> {
     /// Returns the [`LocalDefId`] of the overarching item whose constituents get lowered.
     fn item_def_id(&self) -> LocalDefId;
 
-    /// Returns `true` if the current context allows the use of inference variables.
-    fn allow_infer(&self) -> bool;
-
     /// Returns the region to use when a lifetime is omitted (and not elided).
     ///
     /// The `object_lifetime_default` argument states whether this lifetime is from a reference.
diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
index e62c4639b43..6e4a464905f 100644
--- a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
+++ b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
@@ -222,10 +222,6 @@ impl<'a, 'tcx> HirTyLowerer<'tcx> for FnCtxt<'a, 'tcx> {
         self.body_id
     }
 
-    fn allow_infer(&self) -> bool {
-        true
-    }
-
     fn re_infer(
         &self,
         def: Option<&ty::GenericParamDef>,