@@ -146,8 +146,6 @@ pub const unsafe fn unreachable_unchecked() -> ! { |
|
|
146 |
146 |
/// # Example |
147 |
147 |
/// |
148 |
148 |
/// ``` |
149 |
|
-/// #![feature(hint_assert_unchecked)] |
150 |
|
-/// |
151 |
149 |
/// use core::hint; |
152 |
150 |
/// |
153 |
151 |
/// /// # Safety |
@@ -194,11 +192,11 @@ pub const unsafe fn unreachable_unchecked() -> ! { |
|
|
194 |
192 |
/// to put an an assertion right next to code that checks the same thing, and dereferencing a |
195 |
193 |
/// pointer already has the builtin assumption that it is nonnull. However, it illustrates the |
196 |
194 |
/// kind of changes the optimizer can make even when the behavior is less obviously related. |
|
195 |
+#[track_caller] |
197 |
196 |
#[inline(always)] |
198 |
197 |
#[doc(alias = "assume")] |
199 |
|
-#[track_caller] |
200 |
|
-#[unstable(feature = "hint_assert_unchecked", issue = "119131")] |
201 |
|
-#[rustc_const_unstable(feature = "const_hint_assert_unchecked", issue = "119131")] |
|
198 |
+#[stable(feature = "hint_assert_unchecked", since = "CURRENT_RUSTC_VERSION")] |
|
199 |
+#[rustc_const_stable(feature = "hint_assert_unchecked", since = "CURRENT_RUSTC_VERSION")] |
202 |
200 |
pub const unsafe fn assert_unchecked(cond: bool) { |
203 |
201 |
// SAFETY: The caller promised `cond` is true. |
204 |
202 |
unsafe { |