Skip to content

Various HirTyLowerer cleanups #125819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove allows_infer now that every use of it is delegated to `HirTy…
…Lowerer`
  • Loading branch information
oli-obk committed Jun 5, 2024
commit 78706740d57d54a6da8abc8eda148c3bcdb64d40
4 changes: 0 additions & 4 deletions compiler/rustc_hir_analysis/src/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down