diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-09-17 17:41:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-17 17:41:19 +0200 |
| commit | eb62779f2d6dc5cfe9208416e13392744b4e76ac (patch) | |
| tree | 5886a363f22f0a69a8f58f55933c56eb6ed637e3 /compiler/rustc_codegen_llvm/src | |
| parent | 723d27934bcf7b8ded74c8a90298fdaece99ebd2 (diff) | |
| parent | 11c0e58c7489df3f71c3aebe04ad6d1b6a9f6262 (diff) | |
| download | rust-eb62779f2d6dc5cfe9208416e13392744b4e76ac.tar.gz rust-eb62779f2d6dc5cfe9208416e13392744b4e76ac.zip | |
Rollup merge of #88954 - nbdd0121:panic3, r=oli-obk
Allow `panic!("{}", computed_str)` in const fn.
Special-case `panic!("{}", arg)` and translate it to `panic_display(&arg)`. `panic_display` will behave like `panic_any` in cosnt eval and behave like `panic!(format_args!("{}", arg))` in runtime.
This should bring Rust 2015 and 2021 to feature parity in terms of `const_panic`; and hopefully would unblock the stabilisation of #51999.
`@rustbot` modify labels: +T-compiler +T-libs +A-const-eval +A-const-fn
r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
