Skip to content

Commit 488ebee

Browse files
committed
Remove lower_arg_ty as all callers were passing None
1 parent fe5c95d commit 488ebee

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

compiler/rustc_hir_analysis/src/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
494494

495495
// Only visit the type looking for `_` if we didn't fix the type above
496496
visitor.visit_ty_unambig(a);
497-
self.lowerer().lower_arg_ty(a, None)
497+
self.lowerer().lower_ty(a)
498498
})
499499
.collect();
500500

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,16 +2708,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
27082708
}
27092709
}
27102710

2711-
pub fn lower_arg_ty(&self, ty: &hir::Ty<'tcx>, expected_ty: Option<Ty<'tcx>>) -> Ty<'tcx> {
2712-
match ty.kind {
2713-
hir::TyKind::Infer(()) if let Some(expected_ty) = expected_ty => {
2714-
self.record_ty(ty.hir_id, expected_ty, ty.span);
2715-
expected_ty
2716-
}
2717-
_ => self.lower_ty(ty),
2718-
}
2719-
}
2720-
27212711
/// Lower a function type from the HIR to our internal notion of a function signature.
27222712
#[instrument(level = "debug", skip(self, hir_id, safety, abi, decl, generics, hir_ty), ret)]
27232713
pub fn lower_fn_ty(

compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
382382
_hir_id: rustc_hir::HirId,
383383
_hir_ty: Option<&hir::Ty<'_>>,
384384
) -> (Vec<Ty<'tcx>>, Ty<'tcx>) {
385-
let input_tys = decl.inputs.iter().map(|a| self.lowerer().lower_arg_ty(a, None)).collect();
385+
let input_tys = decl.inputs.iter().map(|a| self.lowerer().lower_ty(a)).collect();
386386

387387
let output_ty = match decl.output {
388388
hir::FnRetTy::Return(output) => self.lowerer().lower_ty(output),

0 commit comments

Comments
 (0)