Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_trait_selection/src/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ pub fn try_evaluate_const<'tcx>(

(args, typing_env)
}
_ => {
Some(ty::AnonConstKind::MCG) | Some(ty::AnonConstKind::NonTypeSystem) | None => {
// We are only dealing with "truly" generic/uninferred constants here:
// - GCEConsts have been handled separately
// - Repeat expr count back compat consts have also been handled separately
Expand All @@ -637,7 +637,7 @@ pub fn try_evaluate_const<'tcx>(

// Since there is no generic parameter, we can just drop the environment
// to prevent query cycle.
let typing_env = infcx.typing_env(ty::ParamEnv::empty());
let typing_env = ty::TypingEnv::post_analysis(tcx, uv.def);

(uv.args, typing_env)
}
Expand Down
Loading