Skip to content

Commit

Permalink
skip normalizing param env if it is already normalized
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Markeffsky committed Sep 19, 2024
1 parent b0af276 commit 1999d06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_trait_selection/src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ pub fn normalize_param_env_or_error<'tcx>(
debug!("normalize_param_env_or_error: elaborated-predicates={:?}", predicates);

let elaborated_env = ty::ParamEnv::new(tcx.mk_clauses(&predicates), unnormalized_env.reveal());
if !normalize::needs_normalization(&elaborated_env, unnormalized_env.reveal()) {
return elaborated_env;
}

// HACK: we are trying to normalize the param-env inside *itself*. The problem is that
// normalization expects its param-env to be already normalized, which means we have
Expand Down

0 comments on commit 1999d06

Please sign in to comment.