about summary refs log tree commit diff
path: root/src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-07-06 12:38:26 +0000
committerMara Bos <m-ou.se@m-ou.se>2021-07-28 16:10:41 +0200
commitf827d3e2851c97598b9d5c2648dc494ac00ca02f (patch)
treeb8e143ec231b79838d0e157fb342b26823f9b9c4 /src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff
parenteba3228b2a9875d268ff3990903d04e19f6cdb0c (diff)
downloadrust-f827d3e2851c97598b9d5c2648dc494ac00ca02f.tar.gz
rust-f827d3e2851c97598b9d5c2648dc494ac00ca02f.zip
Make const panic!("..") work in Rust 2021.
During const eval, this replaces calls to core::panicking::panic_fmt and
std::panicking::being_panic_fmt with a call to a new const fn:
core::panicking::const_panic_fmt. That function uses
fmt::Arguments::as_str() to get the str and calls panic_str with that
instead.

panic!() invocations with formatting arguments are still not accepted,
as the creation of such a fmt::Arguments cannot be done in constant
functions right now.
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff')
0 files changed, 0 insertions, 0 deletions