Remove lower_arg_ty as all callers were passing None
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user