Rollup merge of #124266 - RalfJung:no-answer, r=joboet

remove an unused type from the reentrant lock tests

At least it seems unused. This was added back in 45aa6c8d1b together with a test related to poisoning; when the test got removed, it seems like it was forgotten to also remove this type.
This commit is contained in:
Matthias Krüger 2024-04-23 06:24:58 +02:00 committed by GitHub
commit 819b4d5e5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
use super::{ReentrantLock, ReentrantLockGuard};
use super::ReentrantLock;
use crate::cell::RefCell;
use crate::sync::Arc;
use crate::thread;
@ -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;
}
}