about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-20 14:04:57 +0000
committerbors <bors@rust-lang.org>2024-02-20 14:04:57 +0000
commit2b43e75c98cc5ae32328c8b49657bcd882eb5e75 (patch)
tree92f9113b2e61772e93dd7c56845b1369676df6d3 /compiler/rustc_pattern_analysis/src
parent29f87ade9d78d233e85ef6ca2d6153d0d4fd38d6 (diff)
parent4a12f8278538e020fcff7d48b4d30b4838b487b6 (diff)
downloadrust-2b43e75c98cc5ae32328c8b49657bcd882eb5e75.tar.gz
rust-2b43e75c98cc5ae32328c8b49657bcd882eb5e75.zip
Auto merge of #120863 - saethlin:slice-get-checked, r=the8472
Use intrinsics::debug_assertions in debug_assert_nounwind

This is the first item in https://github.com/rust-lang/rust/issues/120848.

Based on the benchmarking in this PR, it looks like, for the programs in our benchmark suite, enabling all these additional checks does not introduce significant compile-time overhead, with the single exception of `Alignment::new_unchecked`. Therefore, I've added `#[cfg(debug_assertions)]` to that one call site, so that it remains compiled out in the distributed standard library.

The trailing commas in the previous calls to `debug_assert_nounwind!` were causing the macro to expand to `panic_nouwnind_fmt`, which requires more work to set up its arguments, and that overhead alone is measured between this perf run and the next: https://github.com/rust-lang/rust/pull/120863#issuecomment-1937423502
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions