Skip to content

Commit 5d42de2

Browse files
committed
Add allow unstable, fix stability of validity_invariants_of
1 parent ea5be8b commit 5d42de2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

library/core/src/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ pub struct Invariant {
21512151
/// Returns a list of all validity invariants of the type.
21522152
pub const fn validity_invariants_of<T>() -> &'static [Invariant] {
21532153
extern "rust-intrinsic" {
2154-
#[rustc_const_stable(feature = "validity_invariants_of", since = "1.40.0")]
2154+
#[rustc_const_unstable(feature = "validity_invariants_of", issue = "none")]
21552155
pub fn validity_invariants_of<T>() -> &'static [u8];
21562156
}
21572157

library/core/src/mem/maybe_uninit.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ impl<T> MaybeUninit<T> {
626626
#[inline(always)]
627627
#[rustc_diagnostic_item = "assume_init"]
628628
#[track_caller]
629+
#[rustc_allow_const_fn_unstable(const_refs_to_cell)]
629630
pub const unsafe fn assume_init(self) -> T {
630631
// SAFETY: the caller must guarantee that `self` is initialized.
631632
// This also means that `self` must be a `value` variant.

0 commit comments

Comments
 (0)