aboutsummaryrefslogtreecommitdiff
path: root/tests/repr_packed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/repr_packed.rs')
-rw-r--r--tests/repr_packed.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/repr_packed.rs b/tests/repr_packed.rs
index be7cab9..a0d8bdc 100644
--- a/tests/repr_packed.rs
+++ b/tests/repr_packed.rs
@@ -1,8 +1,5 @@
#![warn(rust_2018_idioms, single_use_lifetimes)]
-// unaligned_references did not exist in older compilers and safe_packed_borrows was removed in the latest compilers.
-// https://github.com/rust-lang/rust/pull/82525
-#![allow(unknown_lints, renamed_and_removed_lints)]
-#![forbid(unaligned_references, safe_packed_borrows)]
+#![forbid(safe_packed_borrows)]
use std::cell::Cell;
@@ -33,7 +30,7 @@ fn weird_repr_packed() {
fn drop(&mut self) {
FIELD_ADDR.with(|f| {
f.set(&self.field as *const u8 as usize);
- });
+ })
}
}
@@ -48,5 +45,5 @@ fn weird_repr_packed() {
let field_addr = &x.field as *const u8 as usize;
field_addr
};
- assert_eq!(field_addr, FIELD_ADDR.with(Cell::get));
+ assert_eq!(field_addr, FIELD_ADDR.with(|f| f.get()));
}