/// let c = Cell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_cell_new"))]
#[inline]
pub const fn new(value: T) -> Cell<T> {
Cell {
/// let c = RefCell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_refcell_new"))]
#[inline]
pub const fn new(value: T) -> RefCell<T> {
RefCell {
/// let uc = UnsafeCell::new(5);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unsafe_cell_new"))]
#[inline]
pub const fn new(value: T) -> UnsafeCell<T> {
UnsafeCell { value: value }
#![feature(prelude_import)]
#![feature(repr_simd, platform_intrinsics)]
#![feature(rustc_attrs)]
+#![cfg_attr(not(stage0), feature(rustc_const_unstable))]
#![feature(specialization)]
#![feature(staged_api)]
#![feature(unboxed_closures)]
#![feature(untagged_unions)]
#![feature(unwind_attributes)]
+#![cfg_attr(not(stage0), feature(const_min_value))]
+#![cfg_attr(not(stage0), feature(const_max_value))]
+#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_isize_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_usize_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_i8_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_u8_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_i16_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_u16_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_i32_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_u32_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_i64_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_u64_new))]
+#![cfg_attr(not(stage0), feature(const_unsafe_cell_new))]
+#![cfg_attr(not(stage0), feature(const_cell_new))]
+#![cfg_attr(not(stage0), feature(const_nonzero_new))]
+
#[prelude_import]
#[allow(unused)]
use prelude::v1::*;
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_size_of"))]
pub const fn size_of<T>() -> usize {
unsafe { intrinsics::size_of::<T>() }
}
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_align_of"))]
pub const fn align_of<T>() -> usize {
unsafe { intrinsics::min_align_of::<T>() }
}
impl<T: Zeroable> NonZero<T> {
/// Creates an instance of NonZero with the provided value.
/// You must indeed ensure that the value is actually "non-zero".
+ #[unstable(feature = "nonzero",
+ reason = "needs an RFC to flesh out the design",
+ issue = "27730")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_nonzero_new"))]
#[inline]
pub const unsafe fn new_unchecked(inner: T) -> Self {
NonZero(inner)
/// assert_eq!(i8::min_value(), -128);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))]
#[inline]
pub const fn min_value() -> Self {
!0 ^ ((!0 as $UnsignedT) >> 1) as Self
/// assert_eq!(i8::max_value(), 127);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))]
#[inline]
pub const fn max_value() -> Self {
!Self::min_value()
/// assert_eq!(u8::min_value(), 0);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_min_value"))]
#[inline]
pub const fn min_value() -> Self { 0 }
/// assert_eq!(u8::max_value(), 255);
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_max_value"))]
#[inline]
pub const fn max_value() -> Self { !0 }
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null"))]
pub const fn null<T>() -> *const T { 0 as *const T }
/// Creates a null mutable raw pointer.
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
+#[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_ptr_null_mut"))]
pub const fn null_mut<T>() -> *mut T { 0 as *mut T }
/// Swaps the values at two mutable locations of the same type, without
/// # Safety
///
/// `ptr` must be non-null.
+ #[unstable(feature = "unique", issue = "27730")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_unique_new"))]
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
Unique { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
}
/// # Safety
///
/// `ptr` must be non-null.
+ #[unstable(feature = "shared", issue = "27730")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_shared_new"))]
pub const unsafe fn new_unchecked(ptr: *mut T) -> Self {
Shared { pointer: NonZero::new_unchecked(ptr), _marker: PhantomData }
}
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_atomic_bool_new"))]
pub const fn new(v: bool) -> AtomicBool {
AtomicBool { v: UnsafeCell::new(v as u8) }
}
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_atomic_ptr_new"))]
pub const fn new(p: *mut T) -> AtomicPtr<T> {
AtomicPtr { p: UnsafeCell::new(p) }
}
#[cfg(target_has_atomic = "ptr")]
macro_rules! atomic_int {
- ($stable:meta,
+ ($stable:meta, $const_unstable:meta,
$stable_cxchg:meta,
$stable_debug:meta,
$stable_access:meta,
/// ```
#[inline]
#[$stable]
+ #[cfg_attr(not(stage0), $const_unstable)]
pub const fn new(v: $int_type) -> Self {
$atomic_type {v: UnsafeCell::new(v)}
}
#[cfg(target_has_atomic = "8")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_i8_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "8")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_u8_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "16")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_i16_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "16")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_u16_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "32")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_i32_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "32")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_u32_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "64")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_i64_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "64")]
atomic_int! {
unstable(feature = "integer_atomics", issue = "32976"),
+ rustc_const_unstable(feature = "const_atomic_u64_new"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
unstable(feature = "integer_atomics", issue = "32976"),
#[cfg(target_has_atomic = "ptr")]
atomic_int!{
stable(feature = "rust1", since = "1.0.0"),
+ rustc_const_unstable(feature = "const_atomic_isize_new"),
stable(feature = "extended_compare_and_swap", since = "1.10.0"),
stable(feature = "atomic_debug", since = "1.3.0"),
stable(feature = "atomic_access", since = "1.15.0"),
#[cfg(target_has_atomic = "ptr")]
atomic_int!{
stable(feature = "rust1", since = "1.0.0"),
+ rustc_const_unstable(feature = "const_atomic_usize_new"),
stable(feature = "extended_compare_and_swap", since = "1.10.0"),
stable(feature = "atomic_debug", since = "1.3.0"),
stable(feature = "atomic_access", since = "1.15.0"),
#![deny(warnings)]
#![feature(box_syntax)]
-#![feature(const_fn)]
#![feature(core_float)]
#![feature(core_private_bignum)]
#![feature(core_private_diy_float)]
#![feature(try_from)]
#![feature(unique)]
+#![feature(const_atomic_bool_new)]
+#![feature(const_atomic_usize_new)]
+#![feature(const_atomic_isize_new)]
+
extern crate core;
extern crate test;
extern crate rand;
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(conservative_impl_trait)]
-#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(i128_type)]
#![cfg_attr(windows, feature(libc))]
#![feature(trace_macros)]
#![feature(test)]
+#![cfg_attr(stage0, feature(const_fn))]
+#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
+
#![recursion_limit="256"]
extern crate arena;
#![deny(warnings)]
#![forbid(unsafe_code)]
-#![feature(const_fn)]
#![feature(i128_type)]
#![feature(slice_patterns)]
#![feature(try_from)]
+#![cfg_attr(stage0, feature(const_fn))]
+#![cfg_attr(not(stage0), feature(const_min_value))]
+#![cfg_attr(not(stage0), feature(const_max_value))]
+
#[macro_use]
extern crate rustc_bitflags;
#![feature(slice_patterns)]
#![feature(box_patterns)]
#![feature(box_syntax)]
-#![feature(const_fn)]
#![feature(i128_type)]
+#![cfg_attr(stage0, feature(const_fn))]
+#![cfg_attr(not(stage0), feature(const_min_value))]
+
extern crate arena;
#[macro_use] extern crate syntax;
#[macro_use] extern crate log;
html_root_url = "https://doc.rust-lang.org/nightly/")]
#![deny(warnings)]
-#![feature(const_fn)]
#![feature(i128)]
#![feature(i128_type)]
+#![cfg_attr(stage0, feature(const_fn))]
+#![cfg_attr(not(stage0), feature(const_min_value))]
+#![cfg_attr(not(stage0), feature(const_max_value))]
+
extern crate rustc_apfloat;
extern crate syntax;
You can also have this error while using a cell type:
```compile_fail,E0492
-#![feature(const_fn)]
+#![feature(const_cell_new)]
use std::cell::Cell;
wrapper:
```
-#![feature(const_fn)]
+#![feature(const_cell_new)]
use std::cell::Cell;
use std::marker::Sync;
#![feature(box_patterns)]
#![feature(box_syntax)]
-#![feature(const_fn)]
#![feature(custom_attribute)]
#![allow(unused_attributes)]
#![feature(i128_type)]
#![feature(slice_patterns)]
#![feature(conservative_impl_trait)]
+#![cfg_attr(stage0, feature(const_fn))]
+#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
+#![cfg_attr(not(stage0), feature(const_once_new))]
+
use rustc::dep_graph::WorkProduct;
use syntax_pos::symbol::Symbol;
#![feature(box_patterns)]
#![feature(box_syntax)]
-#![feature(const_fn)]
#![feature(custom_attribute)]
#![allow(unused_attributes)]
#![feature(i128_type)]
#![feature(slice_patterns)]
#![feature(conservative_impl_trait)]
+#![cfg_attr(stage0, feature(const_fn))]
+
extern crate rustc;
extern crate syntax;
extern crate syntax_pos;
#![feature(raw)]
#![feature(repr_simd)]
#![feature(rustc_attrs)]
+#![cfg_attr(not(stage0), feature(rustc_const_unstable))]
#![feature(shared)]
#![feature(sip_hash_13)]
#![feature(slice_bytes)]
#![feature(doc_cfg)]
#![cfg_attr(test, feature(update_panic_count))]
+#![cfg_attr(not(stage0), feature(const_max_value))]
+#![cfg_attr(not(stage0), feature(const_atomic_bool_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_isize_new))]
+#![cfg_attr(not(stage0), feature(const_atomic_usize_new))]
+#![cfg_attr(all(not(stage0), windows), feature(const_atomic_ptr_new))]
+#![cfg_attr(not(stage0), feature(const_unsafe_cell_new))]
+#![cfg_attr(not(stage0), feature(const_cell_new))]
+#![cfg_attr(not(stage0), feature(const_once_new))]
+#![cfg_attr(not(stage0), feature(const_ptr_null))]
+#![cfg_attr(not(stage0), feature(const_ptr_null_mut))]
+
#![default_lib_allocator]
// Always use alloc_system during stage0 since we don't know if the alloc_*
impl Once {
/// Creates a new `Once` value.
#[stable(feature = "once_new", since = "1.2.0")]
+ #[cfg_attr(not(stage0), rustc_const_unstable(feature = "const_once_new"))]
pub const fn new() -> Once {
Once {
state: AtomicUsize::new(INCOMPLETE),
// which is a reduction of this code to more directly show the reason
// for the error message we see here.)
-#![feature(const_fn, rustc_private)]
+#![feature(rustc_private)]
+#![feature(const_atomic_usize_new)]
extern crate arena;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(const_fn)]
-
fn f(x: usize) -> usize {
x
}
+++ /dev/null
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// Test use of const fn from another crate without a feature gate.
-
-// aux-build:const_fn_lib.rs
-
-extern crate const_fn_lib;
-
-use const_fn_lib::foo;
-
-static FOO: usize = foo(); //~ ERROR const fns are an unstable feature
-const BAR: usize = foo(); //~ ERROR const fns are an unstable feature
-
-macro_rules! constant {
- ($n:ident: $t:ty = $v:expr) => {
- const $n: $t = $v;
- }
-}
-
-constant! {
- BAZ: usize = foo() //~ ERROR const fns are an unstable feature
-}
-
-fn main() {
-// let x: [usize; foo()] = [];
-}
//
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::cell::Cell;
use id::Id;
// RFC 736 (and Issue 21407): functional struct update should respect privacy.
-#![feature(const_fn)]
-
// The `foo` module attempts to maintains an invariant that each `S`
// has a unique `u64` id.
use self::foo::S;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(const_fn)]
+#![feature(const_unsafe_cell_new)]
use std::cell::UnsafeCell;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(const_fn)]
+#![feature(const_fn, const_cell_new, const_unsafe_cell_new)]
#![feature(cfg_target_thread_local, thread_local_internals)]
// On platforms *without* `#[thread_local]`, use
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(box_syntax)]
-#![feature(const_fn)]
-#![allow(warnings)]
+#![feature(box_syntax, const_refcell_new)]
use std::cell::RefCell;
static boxed: Box<RefCell<isize>> = box RefCell::new(0);
//~^ ERROR allocations are not allowed in statics
//~| ERROR `std::cell::RefCell<isize>: std::marker::Sync` is not satisfied
+//~| WARN unsupported constant expr
fn main() { }
#![allow(dead_code, unused_variables)]
#![feature(omit_gdb_pretty_printer_section)]
#![omit_gdb_pretty_printer_section]
-#![feature(const_fn)]
+#![feature(const_unsafe_cell_new)]
#![feature(static_mutex)]
// This test makes sure that the compiler doesn't crash when trying to assign
// no-prefer-dynamic
#![allow(dead_code)]
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
// check dtor calling order when casting enums.
// `Item` originates in a where-clause, not the declaration of
// `T`. Issue #20300.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::marker::{PhantomData};
use std::sync::atomic::{AtomicUsize};
#![crate_type="rlib"]
#![feature(const_fn)]
-pub const fn foo() -> usize { 22 } //~ ERROR const fn is unstable
+pub const fn foo() -> usize { 22 }
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::sync::atomic;
// except according to those terms.
#![feature(cfg_target_thread_local, const_fn, thread_local)]
+#![feature(const_cell_new)]
#![crate_type = "lib"]
#[cfg(target_thread_local)]
// ignore-emscripten no threads support
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering};
// ignore-emscripten no threads support
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering};
+++ /dev/null
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// aux-build:const_fn_lib.rs
-
-// A very basic test of const fn functionality.
-
-#![feature(const_fn)]
-
-extern crate const_fn_lib;
-
-use const_fn_lib::foo;
-
-const FOO: usize = foo();
-
-fn main() {
- assert_eq!(FOO, 22);
- let _: [i32; foo()] = [42; 22];
-}
--- /dev/null
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Test use of const fn from another crate without a feature gate.
+
+// aux-build:const_fn_lib.rs
+
+extern crate const_fn_lib;
+
+use const_fn_lib::foo;
+
+static FOO: usize = foo();
+const BAR: usize = foo();
+
+macro_rules! constant {
+ ($n:ident: $t:ty = $v:expr) => {
+ const $n: $t = $v;
+ }
+}
+
+constant! {
+ BAZ: usize = foo()
+}
+
+fn main() {
+ let x: [usize; foo()] = [42; foo()];
+}
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(const_fn)]
+#![feature(const_fn, const_size_of, const_align_of)]
use std::mem;
// pretty-expanded FIXME #23616
#![feature(core)]
-#![feature(const_fn)]
-
+#![feature(const_unsafe_cell_new)]
use std::marker;
use std::cell::UnsafeCell;
#![feature(core)]
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
extern crate issue_17718_aux as other;
// created via FRU and control-flow breaks in the middle of
// construction.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::sync::atomic::{Ordering, AtomicUsize};
// ignore-emscripten no threads support
-#![feature(const_fn)]
-
// Check that the destructors of simple enums are run on unwinding
+#![feature(const_atomic_usize_new)]
+
use std::sync::atomic::{Ordering, AtomicUsize};
use std::thread;
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::sync::atomic::{Ordering, AtomicUsize};
// the contents implement Drop and we hit a panic in the middle of
// construction.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::thread;
use std::sync::atomic::{AtomicUsize, Ordering};
// ignore-emscripten no threads support
-#![feature(panic_handler, const_fn, std_panic)]
+#![feature(panic_handler, std_panic)]
+#![feature(const_atomic_usize_new)]
use std::sync::atomic::{AtomicUsize, Ordering};
use std::panic;
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-#![feature(panic_handler, const_fn, std_panic)]
+#![feature(panic_handler, std_panic)]
+#![feature(const_atomic_usize_new)]
// ignore-emscripten no threads support
// Checks that functional-record-update order-of-eval is as expected
// even when no Drop-implementations are involved.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::sync::atomic::{Ordering, AtomicUsize};
// Checks that struct-literal expression order-of-eval is as expected
// even when no Drop-implementations are involved.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::sync::atomic::{Ordering, AtomicUsize};
// ignore-emscripten no threads support
-#![feature(const_fn)]
#![feature(rand)]
#![feature(sort_unstable)]
+#![feature(const_atomic_usize_new)]
use std::__rand::{thread_rng, Rng};
use std::cell::Cell;
//
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::cell::Cell;
use id::Id;
//
// (Compare against compile-fail/dropck_arr_cycle_checked.rs)
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::cell::Cell;
use id::Id;
// conditions above to be satisfied, meaning that if the dropck is
// sound, it should reject this code.
-#![feature(const_fn)]
+#![feature(const_atomic_usize_new)]
use std::cell::Cell;
use id::Id;