Skip to content

Commit 6d1f7ba

Browse files
authored
Unrolled build for rust-lang#131287
Rollup merge of rust-lang#131287 - RalfJung:const_result, r=tgross35 stabilize const_result Waiting for FCP to complete in rust-lang#82814 Fixes rust-lang#82814
2 parents 1bc403d + 92f6568 commit 6d1f7ba

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

library/core/src/result.rs

+9-4
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,8 @@ impl<T, E> Result<T, E> {
734734
/// ```
735735
#[inline]
736736
#[stable(feature = "rust1", since = "1.0.0")]
737-
#[rustc_const_unstable(feature = "const_result", issue = "82814")]
737+
#[rustc_const_stable(feature = "const_result", since = "CURRENT_RUSTC_VERSION")]
738+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
738739
pub const fn as_mut(&mut self) -> Result<&mut T, &mut E> {
739740
match *self {
740741
Ok(ref mut x) => Ok(x),
@@ -1536,7 +1537,8 @@ impl<T, E> Result<&T, E> {
15361537
/// ```
15371538
#[inline]
15381539
#[stable(feature = "result_copied", since = "1.59.0")]
1539-
#[rustc_const_unstable(feature = "const_result", issue = "82814")]
1540+
#[rustc_const_stable(feature = "const_result", since = "CURRENT_RUSTC_VERSION")]
1541+
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
15401542
pub const fn copied(self) -> Result<T, E>
15411543
where
15421544
T: Copy,
@@ -1586,7 +1588,9 @@ impl<T, E> Result<&mut T, E> {
15861588
/// ```
15871589
#[inline]
15881590
#[stable(feature = "result_copied", since = "1.59.0")]
1589-
#[rustc_const_unstable(feature = "const_result", issue = "82814")]
1591+
#[rustc_const_stable(feature = "const_result", since = "CURRENT_RUSTC_VERSION")]
1592+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
1593+
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
15901594
pub const fn copied(self) -> Result<T, E>
15911595
where
15921596
T: Copy,
@@ -1639,7 +1643,8 @@ impl<T, E> Result<Option<T>, E> {
16391643
/// ```
16401644
#[inline]
16411645
#[stable(feature = "transpose_result", since = "1.33.0")]
1642-
#[rustc_const_unstable(feature = "const_result", issue = "82814")]
1646+
#[rustc_const_stable(feature = "const_result", since = "CURRENT_RUSTC_VERSION")]
1647+
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
16431648
pub const fn transpose(self) -> Option<Result<T, E>> {
16441649
match self {
16451650
Ok(Some(x)) => Some(Ok(x)),

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#![feature(const_pin)]
3030
#![feature(const_pointer_is_aligned)]
3131
#![feature(const_ptr_write)]
32-
#![feature(const_result)]
3332
#![feature(const_three_way_compare)]
3433
#![feature(const_trait_impl)]
3534
#![feature(core_intrinsics)]

0 commit comments

Comments
 (0)