diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2025-08-12 12:52:39 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2025-08-12 12:52:39 +0200 |
| commit | f2f06654a59963a71b3f1f87942e71e561b083a7 (patch) | |
| tree | 33d1b82c1d44148807f4c81a50deb5ef84f72804 | |
| parent | a5469b8b4a29c4c57d3c5833a2f946537666d898 (diff) | |
| download | rust-f2f06654a59963a71b3f1f87942e71e561b083a7.tar.gz rust-f2f06654a59963a71b3f1f87942e71e561b083a7.zip | |
Revert "Partially outline code inside the panic! macro".
Without any tests/benchmarks that show some improvement, it's hard to know whether the change had any positive effect at all. (And if it did, whether that effect is still achieved today.)
| -rw-r--r-- | clippy_utils/src/macros.rs | 7 | ||||
| -rw-r--r-- | clippy_utils/src/sym.rs | 3 |
2 files changed, 1 insertions, 9 deletions
diff --git a/clippy_utils/src/macros.rs b/clippy_utils/src/macros.rs index 60473a26493..7cd5a16f5b4 100644 --- a/clippy_utils/src/macros.rs +++ b/clippy_utils/src/macros.rs @@ -250,18 +250,13 @@ impl<'a> PanicExpn<'a> { }; let name = path.segments.last().unwrap().ident.name; - // This has no argument - if name == sym::panic_cold_explicit { - return Some(Self::Empty); - } - let [arg, rest @ ..] = args else { return None; }; let result = match name { sym::panic if arg.span.eq_ctxt(expr.span) => Self::Empty, sym::panic | sym::panic_str => Self::Str(arg), - sym::panic_display | sym::panic_cold_display => { + sym::panic_display => { let ExprKind::AddrOf(_, _, e) = &arg.kind else { return None; }; diff --git a/clippy_utils/src/sym.rs b/clippy_utils/src/sym.rs index ce7cc9348fb..278101ac27f 100644 --- a/clippy_utils/src/sym.rs +++ b/clippy_utils/src/sym.rs @@ -241,9 +241,6 @@ generate! { or_insert, or_insert_with, outer_expn, - panic_cold_display, - panic_cold_explicit, - panic_display, panic_str, parse, partition, |
