Skip to content

Commit

Permalink
Rollup merge of rust-lang#124266 - RalfJung:no-answer, r=joboet
Browse files Browse the repository at this point in the history
remove an unused type from the reentrant lock tests

At least it seems unused. This was added back in 45aa6c8 together with a test related to poisoning; when the test got removed, it seems like it was forgotten to also remove this type.
  • Loading branch information
matthiaskrgr authored Apr 23, 2024
2 parents bffc1ab + f68a254 commit 7a3093a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions std/src/sync/reentrant_lock/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::{ReentrantLock, ReentrantLockGuard};
use super::ReentrantLock;
use crate::cell::RefCell;
use crate::sync::Arc;
use crate::thread;
Expand Down Expand Up @@ -51,10 +51,3 @@ fn trylock_works() {
.unwrap();
let _lock3 = l.try_lock();
}

pub struct Answer<'a>(pub ReentrantLockGuard<'a, RefCell<u32>>);
impl Drop for Answer<'_> {
fn drop(&mut self) {
*self.0.borrow_mut() = 42;
}
}

0 comments on commit 7a3093a

Please sign in to comment.