mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 03:38:29 +00:00
add const_fn features
This commit is contained in:
parent
1f29fd4eb0
commit
2c5e784d6f
@ -14,6 +14,7 @@
|
|||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
#![feature(collections_drain)]
|
#![feature(collections_drain)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
#![feature(hash)]
|
#![feature(hash)]
|
||||||
#![feature(rand)]
|
#![feature(rand)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(unboxed_closures)]
|
#![feature(unboxed_closures)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
#![feature(test)]
|
#![feature(test)]
|
||||||
#![feature(rand)]
|
#![feature(rand)]
|
||||||
#![feature(unicode)]
|
#![feature(unicode)]
|
||||||
|
@ -173,6 +173,7 @@
|
|||||||
#![feature(staged_api)]
|
#![feature(staged_api)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
#![feature(std_misc)]
|
#![feature(std_misc)]
|
||||||
|
|
||||||
use std::boxed;
|
use std::boxed;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#![feature(box_patterns)]
|
#![feature(box_patterns)]
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
|
#![feature(const_fn)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
#![feature(duration)]
|
#![feature(duration)]
|
||||||
#![feature(duration_span)]
|
#![feature(duration_span)]
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
#![feature(libc)]
|
#![feature(libc)]
|
||||||
#![feature(quote)]
|
#![feature(quote)]
|
||||||
#![feature(rustc_diagnostic_macros)]
|
#![feature(rustc_diagnostic_macros)]
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::sync::atomic;
|
use std::sync::atomic;
|
||||||
|
|
||||||
pub const C1: usize = 1;
|
pub const C1: usize = 1;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
//
|
//
|
||||||
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
|
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use id::Id;
|
use id::Id;
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
// for the error message we see here.)
|
// for the error message we see here.)
|
||||||
|
|
||||||
#![allow(unstable)]
|
#![allow(unstable)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
extern crate arena;
|
extern crate arena;
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
//
|
//
|
||||||
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
|
// (Compare against compile-fail/dropck_vec_cycle_checked.rs)
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use id::Id;
|
use id::Id;
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
//
|
//
|
||||||
// (Compare against compile-fail/dropck_arr_cycle_checked.rs)
|
// (Compare against compile-fail/dropck_arr_cycle_checked.rs)
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use id::Id;
|
use id::Id;
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
// RFC 736 (and Issue 21407): functional struct update should respect privacy.
|
// 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`
|
// The `foo` module attempts to maintains an invariant that each `S`
|
||||||
// has a unique `u64` id.
|
// has a unique `u64` id.
|
||||||
use self::foo::S;
|
use self::foo::S;
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::cell::UnsafeCell;
|
use std::cell::UnsafeCell;
|
||||||
|
|
||||||
const A: UnsafeCell<usize> = UnsafeCell::new(1);
|
const A: UnsafeCell<usize> = UnsafeCell::new(1);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
// conditions above to be satisfied, meaning that if the dropck is
|
// conditions above to be satisfied, meaning that if the dropck is
|
||||||
// sound, it should reject this code.
|
// sound, it should reject this code.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use id::Id;
|
use id::Id;
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#![allow(dead_code, unused_variables)]
|
#![allow(dead_code, unused_variables)]
|
||||||
#![omit_gdb_pretty_printer_section]
|
#![omit_gdb_pretty_printer_section]
|
||||||
#![feature(std_misc, core)]
|
#![feature(std_misc, core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
// This test makes sure that the compiler doesn't crash when trying to assign
|
// This test makes sure that the compiler doesn't crash when trying to assign
|
||||||
// debug locations to const-expressions.
|
// debug locations to const-expressions.
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
// check dtor calling order when casting enums.
|
// check dtor calling order when casting enums.
|
||||||
|
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
// `Item` originates in a where-clause, not the declaration of
|
// `Item` originates in a where-clause, not the declaration of
|
||||||
// `T`. Issue #20300.
|
// `T`. Issue #20300.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::marker::{PhantomData};
|
use std::marker::{PhantomData};
|
||||||
use std::sync::atomic::{AtomicUsize};
|
use std::sync::atomic::{AtomicUsize};
|
||||||
use std::sync::atomic::Ordering::SeqCst;
|
use std::sync::atomic::Ordering::SeqCst;
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a
|
// Test that we cleanup a fixed size Box<[D; k]> properly when D has a
|
||||||
// destructor.
|
// destructor.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
// Test that we cleanup dynamic sized Box<[D]> properly when D has a
|
// Test that we cleanup dynamic sized Box<[D]> properly when D has a
|
||||||
// destructor.
|
// destructor.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#![feature(const_fn)]
|
#![feature(const_fn)]
|
||||||
|
|
||||||
struct Foo { val: u32 }
|
struct Foo { value: u32 }
|
||||||
|
|
||||||
impl Foo {
|
impl Foo {
|
||||||
const fn new() -> Foo {
|
const fn new() -> Foo {
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
// pretty-expanded FIXME #23616
|
// pretty-expanded FIXME #23616
|
||||||
|
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
|
|
||||||
use std::marker;
|
use std::marker;
|
||||||
use std::cell::UnsafeCell;
|
use std::cell::UnsafeCell;
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
extern crate issue_17718 as other;
|
extern crate issue_17718 as other;
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
// created via FRU and control-flow breaks in the middle of
|
// created via FRU and control-flow breaks in the middle of
|
||||||
// construction.
|
// construction.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::sync::atomic::{Ordering, AtomicUsize};
|
use std::sync::atomic::{Ordering, AtomicUsize};
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
// the contents implement Drop and we hit a panic in the middle of
|
// the contents implement Drop and we hit a panic in the middle of
|
||||||
// construction.
|
// construction.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// Checks that functional-record-update order-of-eval is as expected
|
// Checks that functional-record-update order-of-eval is as expected
|
||||||
// even when no Drop-implementations are involved.
|
// even when no Drop-implementations are involved.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::sync::atomic::{Ordering, AtomicUsize};
|
use std::sync::atomic::{Ordering, AtomicUsize};
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// Checks that struct-literal expression order-of-eval is as expected
|
// Checks that struct-literal expression order-of-eval is as expected
|
||||||
// even when no Drop-implementations are involved.
|
// even when no Drop-implementations are involved.
|
||||||
|
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::sync::atomic::{Ordering, AtomicUsize};
|
use std::sync::atomic::{Ordering, AtomicUsize};
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#![feature(rand, core)]
|
#![feature(rand, core)]
|
||||||
|
#![feature(const_fn)]
|
||||||
|
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use std::__rand::{thread_rng, Rng};
|
use std::__rand::{thread_rng, Rng};
|
||||||
|
Loading…
Reference in New Issue
Block a user