about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-09-12 03:44:56 -0700
committerGitHub <noreply@github.com>2021-09-12 03:44:56 -0700
commitf5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423 (patch)
tree6309929aa2d74a733e154b06a113e0336801f450 /compiler/rustc_mir_transform/src
parenta8e3afe3720cc4772aa49e1f7f494c60b81f07a1 (diff)
parent8295e4a6cfb12ce74c480172c2854f76d1428b8b (diff)
downloadrust-f5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423.tar.gz
rust-f5ac5cadd3d426cbf9a67dfe1c21a7d404cd2423.zip
Rollup merge of #88709 - BoxyUwU:thir-abstract-const, r=lcnr
generic_const_exprs: use thir for abstract consts instead of mir

Changes `AbstractConst` building to use `thir` instead of `mir` so that there's less chance of consts unifying when they shouldn't because lowering to mir dropped information (see `abstract-consts-as-cast-5.rs` test)

r? `@lcnr`
Diffstat (limited to 'compiler/rustc_mir_transform/src')
-rw-r--r--compiler/rustc_mir_transform/src/lib.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs
index 9a074c10ef4..90d7cbee976 100644
--- a/compiler/rustc_mir_transform/src/lib.rs
+++ b/compiler/rustc_mir_transform/src/lib.rs
@@ -306,7 +306,6 @@ fn mir_promoted(
     // this point, before we steal the mir-const result.
     // Also this means promotion can rely on all const checks having been done.
     let _ = tcx.mir_const_qualif_opt_const_arg(def);
-    let _ = tcx.mir_abstract_const_opt_const_arg(def.to_global());
     let mut body = tcx.mir_const(def).steal();
 
     let mut required_consts = Vec::new();