File tree Expand file tree Collapse file tree 5 files changed +4
-9
lines changed Expand file tree Collapse file tree 5 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 126126#![ feature( fmt_internals) ]
127127#![ feature( fn_traits) ]
128128#![ feature( hasher_prefixfree_extras) ]
129- #![ feature( hint_assert_unchecked) ]
130129#![ feature( inplace_iteration) ]
131130#![ feature( iter_advance_by) ]
132131#![ feature( iter_next_chunk) ]
Original file line number Diff line number Diff line change @@ -146,8 +146,6 @@ pub const unsafe fn unreachable_unchecked() -> ! {
146146/// # Example
147147///
148148/// ```
149- /// #![feature(hint_assert_unchecked)]
150- ///
151149/// use core::hint;
152150///
153151/// /// # Safety
@@ -194,11 +192,11 @@ pub const unsafe fn unreachable_unchecked() -> ! {
194192/// to put an an assertion right next to code that checks the same thing, and dereferencing a
195193/// pointer already has the builtin assumption that it is nonnull. However, it illustrates the
196194/// kind of changes the optimizer can make even when the behavior is less obviously related.
195+ #[ track_caller]
197196#[ inline( always) ]
198197#[ 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" ) ]
202200pub const unsafe fn assert_unchecked ( cond : bool ) {
203201 // SAFETY: The caller promised `cond` is true.
204202 unsafe {
Original file line number Diff line number Diff line change @@ -959,7 +959,7 @@ extern "rust-intrinsic" {
959959/// not be used if the invariant can be discovered by the optimizer on its
960960/// own, or if it does not enable any significant optimizations.
961961///
962- /// This intrinsic does not have a stable counterpart .
962+ /// The stabilized version of this intrinsic is [`core::hint::assert_unchecked`] .
963963#[ rustc_const_stable( feature = "const_assume" , since = "1.77.0" ) ]
964964#[ rustc_nounwind]
965965#[ unstable( feature = "core_intrinsics" , issue = "none" ) ]
Original file line number Diff line number Diff line change 130130#![ feature( const_fmt_arguments_new) ]
131131#![ feature( const_hash) ]
132132#![ feature( const_heap) ]
133- #![ feature( const_hint_assert_unchecked) ]
134133#![ feature( const_index_range_slice_index) ]
135134#![ feature( const_int_from_str) ]
136135#![ feature( const_intrinsic_copy) ]
Original file line number Diff line number Diff line change 335335#![ feature( fmt_internals) ]
336336#![ feature( hasher_prefixfree_extras) ]
337337#![ feature( hashmap_internals) ]
338- #![ feature( hint_assert_unchecked) ]
339338#![ feature( ip) ]
340339#![ feature( maybe_uninit_slice) ]
341340#![ feature( maybe_uninit_uninit_array) ]
You can’t perform that action at this time.
0 commit comments