Skip to content

Commit 9489be0

Browse files
committed
CTFE: support assert_zero_valid and assert_uninit_valid
1 parent 5793c2d commit 9489be0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/intrinsics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,12 +860,14 @@ extern "rust-intrinsic" {
860860
/// zero-initialization: This will statically either panic, or do nothing.
861861
///
862862
/// This intrinsic does not have a stable counterpart.
863+
#[rustc_const_unstable(feature = "const_assert_type2", issue = "none")]
863864
pub fn assert_zero_valid<T>();
864865

865866
/// A guard for unsafe functions that cannot ever be executed if `T` has invalid
866867
/// bit patterns: This will statically either panic, or do nothing.
867868
///
868869
/// This intrinsic does not have a stable counterpart.
870+
#[rustc_const_unstable(feature = "const_assert_type2", issue = "none")]
869871
pub fn assert_uninit_valid<T>();
870872

871873
/// Gets a reference to a static `Location` indicating where it was called.

0 commit comments

Comments
 (0)