Skip to content

Commit

Permalink
use the correct param env
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Mar 21, 2023
1 parent c63861b commit b8541eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler/rustc_lint/src/for_loops_over_fallibles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ fn suggest_question_mark<'tcx>(

ocx.register_bound(
cause,
// FIXME: using the empty param env is wrong, should use the one from `body_id`.
ty::ParamEnv::empty(),
cx.param_env,
// Erase any region vids from the type, which may not be resolved
infcx.tcx.erase_regions(ty),
into_iterator_did,
Expand Down

0 comments on commit b8541eb

Please sign in to comment.