Skip to content

Commit 0b4b66f

Browse files
committed
undo lint suggestion
1 parent 108b540 commit 0b4b66f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ui/as_ptr_cast_mut.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn main() {
2929
let _ = string.as_mut_ptr() as *mut u8;
3030
let _ = string.as_mut_ptr() as *const u8;
3131

32-
let nn = std::ptr::NonNull::new(std::ptr::dangling_mut::<u8>()).unwrap();
32+
let nn = std::ptr::NonNull::new(4 as *mut u8).unwrap();
3333
let _ = nn.as_ptr() as *mut u8;
3434

3535
let mut wrap = MutPtrWrapper(Vec::new());

0 commit comments

Comments
 (0)