Auto merge of #76575 - lcnr:abstract-const, r=oli-obk
compare generic constants using `AbstractConst`s This is a MVP of rust-lang/compiler-team#340. The changes in this PR should only be relevant if `feature(const_evaluatable_checked)` is enabled. ~~currently based on top of #76559, so blocked on that.~~ r? `@oli-obk` cc `@varkor` `@eddyb`
This commit is contained in:
commit
9f8ac718f4
29 changed files with 739 additions and 27 deletions
|
@ -329,7 +329,11 @@ 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 mut body = tcx.mir_const(def).steal();
|
||||
|
||||
let mut required_consts = Vec::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue