Skip to content

Commit fa24055

Browse files
fix compile errors
1 parent 007643f commit fa24055

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

library/core/src/ptr/non_null.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ impl<T: Sized> NonNull<T> {
137137
#[inline]
138138
#[must_use]
139139
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
140-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
140+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
141141
pub const unsafe fn as_uninit_ref<'a>(self) -> &'a MaybeUninit<T> {
142142
// SAFETY: the caller must guarantee that `self` meets all the
143143
// requirements for a reference.
@@ -161,7 +161,7 @@ impl<T: Sized> NonNull<T> {
161161
#[inline]
162162
#[must_use]
163163
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
164-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
164+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
165165
pub const unsafe fn as_uninit_mut<'a>(self) -> &'a mut MaybeUninit<T> {
166166
// SAFETY: the caller must guarantee that `self` meets all the
167167
// requirements for a reference.
@@ -385,7 +385,7 @@ impl<T: ?Sized> NonNull<T> {
385385
#[rustc_const_stable(feature = "const_nonnull_as_ref", since = "1.73.0")]
386386
#[must_use]
387387
#[inline(always)]
388-
#[kani::requires(ub_checks::can_dereference(self.as_ptr() as *const()))] // Ensure input is convertible to a reference
388+
#[requires(ub_checks::can_dereference(self.as_ptr() as *const()))] // Ensure input is convertible to a reference
389389
#[ensures(|result: &&T| core::ptr::eq(*result, self.as_ptr()))] // Ensure returned reference matches pointer
390390
pub const unsafe fn as_ref<'a>(&self) -> &'a T {
391391
// SAFETY: the caller must guarantee that `self` meets all the
@@ -425,7 +425,7 @@ impl<T: ?Sized> NonNull<T> {
425425
#[rustc_const_stable(feature = "const_ptr_as_ref", since = "1.83.0")]
426426
#[must_use]
427427
#[inline(always)]
428-
#[kani::requires(ub_checks::can_dereference(self.as_ptr() as *const()))]
428+
#[requires(ub_checks::can_dereference(self.as_ptr() as *const()))]
429429
// verify result (a mutable reference) is still associated with the same memory address as the raw pointer stored in self
430430
#[ensures(|result: &&mut T| core::ptr::eq(*result, self.as_ptr()))]
431431
pub const unsafe fn as_mut<'a>(&mut self) -> &'a mut T {

0 commit comments

Comments
 (0)