]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/functions/result.rs
replace usages of fn_sig query with bound_fn_sig
[rust.git] / src / tools / clippy / clippy_lints / src / functions / result.rs
index 23da145d038257be75f38c88c8247ac55aaa169a..21de62581f1c39688b6305887ef9b8d66f9577e0 100644 (file)
@@ -21,7 +21,7 @@ fn result_err_ty<'tcx>(
 ) -> Option<(&'tcx hir::Ty<'tcx>, Ty<'tcx>)> {
     if !in_external_macro(cx.sess(), item_span)
         && let hir::FnRetTy::Return(hir_ty) = decl.output
-        && let ty = cx.tcx.erase_late_bound_regions(cx.tcx.fn_sig(id).output())
+        && let ty = cx.tcx.erase_late_bound_regions(cx.tcx.bound_fn_sig(id.into()).subst_identity().output())
         && is_type_diagnostic_item(cx, ty, sym::Result)
         && let ty::Adt(_, substs) = ty.kind()
     {