Skip to content

Commit f2f0665

Browse files
committed
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.)
1 parent a5469b8 commit f2f0665

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

clippy_utils/src/macros.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,18 +250,13 @@ impl<'a> PanicExpn<'a> {
250250
};
251251
let name = path.segments.last().unwrap().ident.name;
252252

253-
// This has no argument
254-
if name == sym::panic_cold_explicit {
255-
return Some(Self::Empty);
256-
}
257-
258253
let [arg, rest @ ..] = args else {
259254
return None;
260255
};
261256
let result = match name {
262257
sym::panic if arg.span.eq_ctxt(expr.span) => Self::Empty,
263258
sym::panic | sym::panic_str => Self::Str(arg),
264-
sym::panic_display | sym::panic_cold_display => {
259+
sym::panic_display => {
265260
let ExprKind::AddrOf(_, _, e) = &arg.kind else {
266261
return None;
267262
};

clippy_utils/src/sym.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@ generate! {
241241
or_insert,
242242
or_insert_with,
243243
outer_expn,
244-
panic_cold_display,
245-
panic_cold_explicit,
246-
panic_display,
247244
panic_str,
248245
parse,
249246
partition,

0 commit comments

Comments
 (0)