Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 681e5da

Browse files
committedSep 16, 2017
change #![feature(const_fn)] to specific gates
1 parent a12d0d4 commit 681e5da

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+127
-75
lines changed
 

‎src/libcore/cell.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ impl<T> Cell<T> {
329329
/// let c = Cell::new(5);
330330
/// ```
331331
#[stable(feature = "rust1", since = "1.0.0")]
332+
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_cell_new"))]
332333
#[inline]
333334
pub const fn new(value: T) -> Cell<T> {
334335
Cell {
@@ -543,6 +544,7 @@ impl<T> RefCell<T> {
543544
/// let c = RefCell::new(5);
544545
/// ```
545546
#[stable(feature = "rust1", since = "1.0.0")]
547+
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_refcell_new"))]
546548
#[inline]
547549
pub const fn new(value: T) -> RefCell<T> {
548550
RefCell {
@@ -1188,6 +1190,7 @@ impl<T> UnsafeCell<T> {
11881190
/// let uc = UnsafeCell::new(5);
11891191
/// ```
11901192
#[stable(feature = "rust1", since = "1.0.0")]
1193+
#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unsafe_cell_new"))]
11911194
#[inline]
11921195
pub const fn new(value: T) -> UnsafeCell<T> {
11931196
UnsafeCell { value: value }

‎src/libcore/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,30 @@
8585
#![feature(prelude_import)]
8686
#![feature(repr_simd, platform_intrinsics)]
8787
#![feature(rustc_attrs)]
88+
#![cfg_attr(not(stage0), feature(rustc_const_unstable))]
8889
#![feature(specialization)]
8990
#![feature(staged_api)]
9091
#![feature(unboxed_closures)]
9192
#![feature(untagged_unions)]
9293
#![feature(unwind_attributes)]
9394

95+
#![cfg_attr(not(stage0), feature(const_min_value))]
96+
#![cfg_attr(not(stage0), feature(const_max_value))]
97+
#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
98+
#![cfg_attr(not(stage0), feature(const_atomic_isize_new))]
99+
#![cfg_attr(not(stage0), feature(const_atomic_usize_new))]
100+
#![cfg_attr(not(stage0), feature(const_atomic_i8_new))]
101+
#![cfg_attr(not(stage0), feature(const_atomic_u8_new))]
102+
#![cfg_attr(not(stage0), feature(const_atomic_i16_new))]
103+
#![cfg_attr(not(stage0), feature(const_atomic_u16_new))]
104+
#![cfg_attr(not(stage0), feature(const_atomic_i32_new))]
105+
#![cfg_attr(not(stage0), feature(const_atomic_u32_new))]
106+
#![cfg_attr(not(stage0), feature(const_atomic_i64_new))]
107+
#![cfg_attr(not(stage0), feature(const_atomic_u64_new))]
108+
#![cfg_attr(not(stage0), feature(const_unsafe_cell_new))]
109+
#![cfg_attr(not(stage0), feature(const_cell_new))]
110+
#![cfg_attr(not(stage0), feature(const_nonzero_new))]
111+
94112
#[prelude_import]
95113
#[allow(unused)]
96114
use prelude::v1::*;

0 commit comments

Comments
 (0)
Please sign in to comment.