Skip to content

Commit 0a21970

Browse files
committed
w
1 parent e08c698 commit 0a21970

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_middle/src/ty

1 file changed

+1
-4
lines changed

compiler/rustc_middle/src/ty/adt.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -502,10 +502,7 @@ impl<'tcx> AdtDef<'tcx> {
502502
let repr_type = self.repr().discr_type();
503503
match tcx.const_eval_poly(expr_did) {
504504
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-
};
505+
let typing_env = ty::TypingEnv::post_analysis(tcx, expr_did);
509506
let ty = repr_type.to_ty(tcx);
510507
if let Some(b) = val.try_to_bits_for_ty(tcx, typing_env, ty) {
511508
trace!("discriminants: {} ({:?})", b, repr_type);

0 commit comments

Comments
 (0)