1
Fork 0

Auto merge of #89247 - fee1-dead:const-eval-select, r=oli-obk

Add `const_eval_select` intrinsic

Adds an intrinsic that calls a given function when evaluated at compiler time, but generates a call to another function when called at runtime.

See https://github.com/rust-lang/const-eval/issues/7 for previous discussion.

r? `@oli-obk.`
This commit is contained in:
bors 2021-10-14 10:06:30 +00:00
commit c34ac8747c
22 changed files with 372 additions and 39 deletions

View file

@ -441,6 +441,8 @@ symbols! {
const_compare_raw_pointers,
const_constructor,
const_eval_limit,
const_eval_select,
const_eval_select_ct,
const_evaluatable_checked,
const_extern_fn,
const_fn,
@ -1097,6 +1099,7 @@ symbols! {
rustc_diagnostic_item,
rustc_diagnostic_macros,
rustc_dirty,
rustc_do_not_const_check,
rustc_dummy,
rustc_dump_env_program_clauses,
rustc_dump_program_clauses,