Skip to content

Commit 8f40b2e

Browse files
committed
undo lint suggestion
1 parent 4d34995 commit 8f40b2e

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
@@ -30,7 +30,7 @@ fn main() {
3030
let _ = string.as_mut_ptr() as *mut u8;
3131
let _ = string.as_mut_ptr() as *const u8;
3232

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

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

0 commit comments

Comments
 (0)