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.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/repr_packed.rs b/tests/repr_packed.rs
index 73fc45c..a0d8bdc 100644
--- a/tests/repr_packed.rs
+++ b/tests/repr_packed.rs
@@ -1,5 +1,5 @@
#![warn(rust_2018_idioms, single_use_lifetimes)]
-#![deny(safe_packed_borrows)]
+#![forbid(safe_packed_borrows)]
use std::cell::Cell;
@@ -22,11 +22,11 @@ fn weird_repr_packed() {
}
#[repr(packed)]
- struct Foo {
+ struct Struct {
field: u8,
}
- impl Drop for Foo {
+ impl Drop for Struct {
fn drop(&mut self) {
FIELD_ADDR.with(|f| {
f.set(&self.field as *const u8 as usize);
@@ -41,7 +41,7 @@ fn weird_repr_packed() {
// Calling drop(foo) causes 'foo' to be moved
// into the 'drop' function, resulting in a different
// address.
- let x = Foo { field: 27 };
+ let x = Struct { field: 27 };
let field_addr = &x.field as *const u8 as usize;
field_addr
};