Skip to content

Commit 2459828

Browse files
committed
Remove allows_infer now that every use of it is delegated to HirTyLowerer
1 parent 007bcc5 commit 2459828

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

compiler/rustc_hir_analysis/src/collect.rs

-4
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,6 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
374374
self.item_def_id
375375
}
376376

377-
fn allow_infer(&self) -> bool {
378-
false
379-
}
380-
381377
fn re_infer(
382378
&self,
383379
_: Option<&ty::GenericParamDef>,

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ pub trait HirTyLowerer<'tcx> {
9090
/// Returns the [`LocalDefId`] of the overarching item whose constituents get lowered.
9191
fn item_def_id(&self) -> LocalDefId;
9292

93-
/// Returns `true` if the current context allows the use of inference variables.
94-
fn allow_infer(&self) -> bool;
95-
9693
/// Returns the region to use when a lifetime is omitted (and not elided).
9794
///
9895
/// The `object_lifetime_default` argument states whether this lifetime is from a reference.

compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,6 @@ impl<'a, 'tcx> HirTyLowerer<'tcx> for FnCtxt<'a, 'tcx> {
222222
self.body_id
223223
}
224224

225-
fn allow_infer(&self) -> bool {
226-
true
227-
}
228-
229225
fn re_infer(
230226
&self,
231227
def: Option<&ty::GenericParamDef>,

0 commit comments

Comments
 (0)