Skip to content

Commit

Permalink
Update non_null.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhvani-Kapadia authored Nov 2, 2024
1 parent 16ecdb9 commit 50521ab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions library/core/src/ptr/non_null.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ impl<T: ?Sized> From<&T> for NonNull<T> {
}

#[cfg(kani)]
#[unstable(feature = "kani", issue = "none")]
#[unstable(feature="kani", issue="none")]
mod verify {
use super::*;
use crate::ptr::null_mut;
Expand All @@ -1829,11 +1829,7 @@ mod verify {
pub fn non_null_check_new() {
let mut x: i32 = kani::any();
let xptr = &mut x;
let maybe_null_ptr = if kani::any() {
xptr as *mut i32
} else {
null_mut()
};
let maybe_null_ptr = if kani::any() { xptr as *mut i32 } else { null_mut() };
let _ = NonNull::new(maybe_null_ptr);
}

Expand Down

0 comments on commit 50521ab

Please sign in to comment.