Skip to content

Commit 58c4a2a

Browse files
committed
TEMP: Silence false positives of unconditional recursive drop
1 parent 5829b8c commit 58c4a2a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/proc_macro/src/bridge/buffer.rs

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ impl Write for Buffer {
120120

121121
impl Drop for Buffer {
122122
#[inline]
123+
#[allow(unconditional_recursion)] // TODO: Fix false positive, maybe by analyzing MIR after drop elaboration?
123124
fn drop(&mut self) {
124125
let b = self.take();
125126
(b.drop)(b);

tests/ui/runtime/rt-explody-panic-payloads.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::process::Command;
99
struct Bomb;
1010

1111
impl Drop for Bomb {
12+
#[allow(unconditional_recursion)] // TODO: Fix false positive, this will panic, not recurse
1213
fn drop(&mut self) {
1314
std::panic::panic_any(Bomb);
1415
}

0 commit comments

Comments
 (0)