Skip to content

Commit

Permalink
TEMP: Silence false positives of unconditional recursive drop
Browse files Browse the repository at this point in the history
  • Loading branch information
Enselic committed Jul 20, 2023
1 parent 5829b8c commit 58c4a2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/proc_macro/src/bridge/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ impl Write for Buffer {

impl Drop for Buffer {
#[inline]
#[allow(unconditional_recursion)] // TODO: Fix false positive, maybe by analyzing MIR after drop elaboration?

Check failure on line 123 in library/proc_macro/src/bridge/buffer.rs

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
fn drop(&mut self) {
let b = self.take();
(b.drop)(b);
Expand Down
1 change: 1 addition & 0 deletions tests/ui/runtime/rt-explody-panic-payloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::process::Command;
struct Bomb;

impl Drop for Bomb {
#[allow(unconditional_recursion)] // TODO: Fix false positive, this will panic, not recurse

Check failure on line 12 in tests/ui/runtime/rt-explody-panic-payloads.rs

View workflow job for this annotation

GitHub Actions / PR - mingw-check-tidy

TODO is used for tasks that should be done before merging a PR; If you want to leave a message in the codebase use FIXME
fn drop(&mut self) {
std::panic::panic_any(Bomb);
}
Expand Down

0 comments on commit 58c4a2a

Please sign in to comment.