We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93ab53f commit 6cb91b5Copy full SHA for 6cb91b5
crates/ptr-union/tests/clone_unaligned.rs
@@ -29,7 +29,7 @@ unsafe impl erasable::ErasablePtr for MyBox {
29
static OFFSET: AtomicUsize = AtomicUsize::new(8);
30
31
impl MyBox {
32
- pub fn new() -> Self {
+ fn new() -> Self {
33
let offset = OFFSET.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
34
MyBox {
35
ptr: NonNull::new(offset as _).unwrap(),
@@ -55,6 +55,7 @@ type Union = Union8<
55
>;
56
57
#[test]
58
+#[allow(clippy::redundant_clone)]
59
#[should_panic = "but the cloned pointer wasn't sufficiently aligned"]
60
fn test_clone_unaligned() {
61
let bx = MyBox::new();
0 commit comments