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 e08c698 commit 0a21970Copy full SHA for 0a21970
compiler/rustc_middle/src/ty/adt.rs
@@ -502,10 +502,7 @@ impl<'tcx> AdtDef<'tcx> {
502
let repr_type = self.repr().discr_type();
503
match tcx.const_eval_poly(expr_did) {
504
Ok(val) => {
505
- let typing_env = ty::TypingEnv {
506
- typing_mode: ty::TypingMode::PostAnalysis,
507
- param_env: tcx.param_env_reveal_all_normalized(expr_did),
508
- };
+ let typing_env = ty::TypingEnv::post_analysis(tcx, expr_did);
509
let ty = repr_type.to_ty(tcx);
510
if let Some(b) = val.try_to_bits_for_ty(tcx, typing_env, ty) {
511
trace!("discriminants: {} ({:?})", b, repr_type);
0 commit comments