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 4e88b73 commit e0106d9Copy full SHA for e0106d9
src/librustc_mir/const_eval.rs
@@ -576,7 +576,11 @@ pub fn const_eval_provider<'a, 'tcx>(
576
key.param_env.reveal = Reveal::UserFacing;
577
match tcx.const_eval(key) {
578
// try again with reveal all as requested
579
- Err(ErrorHandled::TooGeneric) => {},
+ Err(ErrorHandled::TooGeneric) => {
580
+ // Promoteds should never be "too generic" when getting evaluated.
581
+ // They either don't get evaluated, or we are in a monomorphic context
582
+ assert!(key.value.promoted.is_none());
583
+ },
584
// dedupliate calls
585
other => return other,
586
}
0 commit comments