Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b8541eb

Browse files
committedMar 21, 2023
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

Lines changed: 1 addition & 2 deletions
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)
Please sign in to comment.