Skip to content

Commit b8541eb

Browse files
committed
use the correct param env
1 parent c63861b commit b8541eb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_lint/src/for_loops_over_fallibles.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ fn suggest_question_mark<'tcx>(
148148

149149
ocx.register_bound(
150150
cause,
151-
// FIXME: using the empty param env is wrong, should use the one from `body_id`.
152-
ty::ParamEnv::empty(),
151+
cx.param_env,
153152
// Erase any region vids from the type, which may not be resolved
154153
infcx.tcx.erase_regions(ty),
155154
into_iterator_did,

0 commit comments

Comments
 (0)