]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_mir/src/transform/mod.rs
Rollup merge of #77550 - lcnr:ty-dep-path-ct-cleanup, r=ecstatic-morse
[rust.git] / compiler / rustc_mir / src / transform / mod.rs
index b4f5947f5a339aa0c07f0433c63e2fce1a7dcab6..4bafcb2535f0c4070b803f3ca524cbbf8b80289d 100644 (file)
@@ -287,11 +287,7 @@ 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 _ = if let Some(param_did) = def.const_param_did {
-        tcx.mir_abstract_const_of_const_arg((def.did, param_did))
-    } else {
-        tcx.mir_abstract_const(def.did.to_def_id())
-    };
+    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();