Clean up special function const checks#90273
Conversation
|
I'm not very familiar with this code, but it looks like rustc_do_not_const_check also disables post-drop elaboration checking, but this doesn't add extra checks to that code in an obvious way, so maybe this has an unintended side effect of disabling that checking? |
This comment has been minimized.
This comment has been minimized.
|
Mark them as const and `#[rustc_do_not_const_check]` instead of hard-coding them in const-eval checks.
| // We certainly do *not* want to actually call the fn | ||
| // though, so be sure we return here. | ||
| throw_unsup_format!("calling non-const function `{}`", instance) |
There was a problem hiding this comment.
Please remove the is_const_fn local and put this inside the block that sets it to true, since all the hooked fns are now const, we don't need to pass this as a parameter.
I added this because I needed to use |
|
r? @fee1-dead |
|
@bors r+ |
|
📌 Commit 223f580 has been approved by |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (dd757b9): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Mark them as const and
#[rustc_do_not_const_check]instead of hard-coding them in const-eval checks.r? @oli-obk
@rustbot label A-const-eval T-compiler