We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eef8a02 commit 10fa334Copy full SHA for 10fa334
compiler/rustc_trait_selection/src/traits/mod.rs
@@ -635,9 +635,10 @@ pub fn try_evaluate_const<'tcx>(
635
return Err(EvaluateConstErr::HasGenericsOrInfers);
636
}
637
638
- let typing_env = infcx
639
- .typing_env(tcx.erase_and_anonymize_regions(param_env))
640
- .with_post_analysis_normalized(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());
641
+
642
(uv.args, typing_env)
643
644
};
0 commit comments