Remove lower_arg_ty as all callers were passing None

This commit is contained in:
Oli Scherer
2025-06-12 15:03:34 +00:00
parent fe5c95d4ae
commit 488ebeecbe
3 changed files with 2 additions and 12 deletions

View File

@@ -494,7 +494,7 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
// Only visit the type looking for `_` if we didn't fix the type above
visitor.visit_ty_unambig(a);
self.lowerer().lower_arg_ty(a, None)
self.lowerer().lower_ty(a)
})
.collect();

View File

@@ -2708,16 +2708,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
}
}
pub fn lower_arg_ty(&self, ty: &hir::Ty<'tcx>, expected_ty: Option<Ty<'tcx>>) -> Ty<'tcx> {
match ty.kind {
hir::TyKind::Infer(()) if let Some(expected_ty) = expected_ty => {
self.record_ty(ty.hir_id, expected_ty, ty.span);
expected_ty
}
_ => self.lower_ty(ty),
}
}
/// Lower a function type from the HIR to our internal notion of a function signature.
#[instrument(level = "debug", skip(self, hir_id, safety, abi, decl, generics, hir_ty), ret)]
pub fn lower_fn_ty(