diff options
| author | bors <bors@rust-lang.org> | 2021-02-21 05:41:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-02-21 05:41:09 +0000 |
| commit | ed58a2b03b6284b070fae2349898b16df98b7765 (patch) | |
| tree | 5e970609a112d2dd567f7d337cab0e3cbbb48c90 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | a31c16212d70fcae3ad9d073b00d883951e573ee (diff) | |
| parent | 7333759502f9103dfe9f145e0b01ce547c76f165 (diff) | |
| download | rust-ed58a2b03b6284b070fae2349898b16df98b7765.tar.gz rust-ed58a2b03b6284b070fae2349898b16df98b7765.zip | |
Auto merge of #79100 - a1phyr:better_assert_eq, r=m-ou-se
Improve assert_eq! and assert_ne! This PR improves `assert_eq!` and `assert_ne!` by moving the panicking code in an external function. It does not change the fast path, but the move of the formatting in the cold path (the panic) may have a positive effect on in instruction cache use and with inlining. Moreover, the use of trait objects instead of generic may improve compile times for `assert_eq!`-heavy code. Godbolt link: ~~https://rust.godbolt.org/z/TYa9MT~~ \ Updated: https://rust.godbolt.org/z/bzE84x
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
