@@ -226,16 +226,7 @@ pub fn eval_to_const_value_raw_provider<'tcx>(
226226 key : ty:: ParamEnvAnd < ' tcx , GlobalId < ' tcx > > ,
227227) -> :: rustc_middle:: mir:: interpret:: EvalToConstValueResult < ' tcx > {
228228 // see comment in eval_to_allocation_raw_provider for what we're doing here
229- if key. param_env . reveal ( ) == Reveal :: All {
230- let mut key = key;
231- key. param_env = key. param_env . with_user_facing ( ) ;
232- match tcx. eval_to_const_value_raw ( key) {
233- // try again with reveal all as requested
234- Err ( ErrorHandled :: TooGeneric ( _) ) => { }
235- // deduplicate calls
236- other => return other,
237- }
238- }
229+ assert_eq ! ( key. param_env. reveal( ) , Reveal :: All ) ;
239230
240231 // We call `const_eval` for zero arg intrinsics, too, in order to cache their value.
241232 // Catch such calls and evaluate them instead of trying to load a constant's MIR.
@@ -272,17 +263,7 @@ pub fn eval_to_allocation_raw_provider<'tcx>(
272263 // associated constants of generic functions will fail due to not enough monomorphization
273264 // information being available.
274265
275- // In case we fail in the `UserFacing` variant, we just do the real computation.
276- if key. param_env . reveal ( ) == Reveal :: All {
277- let mut key = key;
278- key. param_env = key. param_env . with_user_facing ( ) ;
279- match tcx. eval_to_allocation_raw ( key) {
280- // try again with reveal all as requested
281- Err ( ErrorHandled :: TooGeneric ( _) ) => { }
282- // deduplicate calls
283- other => return other,
284- }
285- }
266+ assert_eq ! ( key. param_env. reveal( ) , Reveal :: All ) ;
286267 if cfg ! ( debug_assertions) {
287268 // Make sure we format the instance even if we do not print it.
288269 // This serves as a regression test against an ICE on printing.
0 commit comments