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
|
// Only visit the type looking for `_` if we didn't fix the type above
|
||||||
visitor.visit_ty_unambig(a);
|
visitor.visit_ty_unambig(a);
|
||||||
self.lowerer().lower_arg_ty(a, None)
|
self.lowerer().lower_ty(a)
|
||||||
})
|
})
|
||||||
.collect();
|
.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.
|
/// 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)]
|
#[instrument(level = "debug", skip(self, hir_id, safety, abi, decl, generics, hir_ty), ret)]
|
||||||
pub fn lower_fn_ty(
|
pub fn lower_fn_ty(
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ impl<'tcx> HirTyLowerer<'tcx> for FnCtxt<'_, 'tcx> {
|
|||||||
_hir_id: rustc_hir::HirId,
|
_hir_id: rustc_hir::HirId,
|
||||||
_hir_ty: Option<&hir::Ty<'_>>,
|
_hir_ty: Option<&hir::Ty<'_>>,
|
||||||
) -> (Vec<Ty<'tcx>>, Ty<'tcx>) {
|
) -> (Vec<Ty<'tcx>>, Ty<'tcx>) {
|
||||||
let input_tys = decl.inputs.iter().map(|a| self.lowerer().lower_arg_ty(a, None)).collect();
|
let input_tys = decl.inputs.iter().map(|a| self.lowerer().lower_ty(a)).collect();
|
||||||
|
|
||||||
let output_ty = match decl.output {
|
let output_ty = match decl.output {
|
||||||
hir::FnRetTy::Return(output) => self.lowerer().lower_ty(output),
|
hir::FnRetTy::Return(output) => self.lowerer().lower_ty(output),
|
||||||
|
|||||||
Reference in New Issue
Block a user