summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_lint/src/for_loops_over_fallibles.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_lint/src/for_loops_over_fallibles.rs')
-rw-r--r--compiler/rustc_lint/src/for_loops_over_fallibles.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/for_loops_over_fallibles.rs b/compiler/rustc_lint/src/for_loops_over_fallibles.rs
index c8ec0458b..ea922785a 100644
--- a/compiler/rustc_lint/src/for_loops_over_fallibles.rs
+++ b/compiler/rustc_lint/src/for_loops_over_fallibles.rs
@@ -137,7 +137,7 @@ fn suggest_question_mark<'tcx>(
// Check that the function/closure/constant we are in has a `Result` type.
// Otherwise suggesting using `?` may not be a good idea.
{
- let ty = cx.typeck_results().expr_ty(&cx.tcx.hir().body(body_id).value);
+ let ty = cx.typeck_results().expr_ty(cx.tcx.hir().body(body_id).value);
let ty::Adt(ret_adt, ..) = ty.kind() else { return false };
if !cx.tcx.is_diagnostic_item(sym::Result, ret_adt.did()) {
return false;