]> git.lizzy.rs Git - rust.git/commitdiff
add const_fn features
authorNiko Matsakis <niko@alum.mit.edu>
Fri, 29 May 2015 13:42:32 +0000 (09:42 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Fri, 29 May 2015 13:42:54 +0000 (09:42 -0400)
27 files changed:
src/libcollectionstest/lib.rs
src/libcoretest/lib.rs
src/liblog/lib.rs
src/librustc/lib.rs
src/librustc_trans/lib.rs
src/test/auxiliary/issue-17718.rs
src/test/compile-fail/dropck_arr_cycle_checked.rs
src/test/compile-fail/dropck_tarena_cycle_checked.rs
src/test/compile-fail/dropck_trait_cycle_checked.rs
src/test/compile-fail/dropck_vec_cycle_checked.rs
src/test/compile-fail/functional-struct-update-respects-privacy.rs
src/test/compile-fail/issue-17718-const-borrow.rs
src/test/compile-fail/issue-7364.rs
src/test/compile-fail/vec-must-not-hide-type-from-dropck.rs
src/test/debuginfo/constant-debug-locs.rs
src/test/run-pass-valgrind/cast-enum-with-dtor.rs
src/test/run-pass/associated-types-project-from-type-param-via-bound-in-where-clause.rs
src/test/run-pass/box-of-array-of-drop-1.rs
src/test/run-pass/box-of-array-of-drop-2.rs
src/test/run-pass/const-fn-method.rs
src/test/run-pass/issue-17718-static-unsafe-interior.rs
src/test/run-pass/issue-17718.rs
src/test/run-pass/issue-21486.rs
src/test/run-pass/nested-vec-3.rs
src/test/run-pass/struct-order-of-eval-3.rs
src/test/run-pass/struct-order-of-eval-4.rs
src/test/run-pass/vector-sort-panic-safe.rs

index 9b50478472fa92d30ad3f3e5c63a2c7217b174ef..0e3f9d5aaddf6aa29c87069a0dfcd52cfaa61c37 100644 (file)
@@ -14,6 +14,7 @@
 #![feature(collections)]
 #![feature(collections_drain)]
 #![feature(core)]
+#![feature(const_fn)]
 #![feature(hash)]
 #![feature(rand)]
 #![feature(rustc_private)]
index 3d14b3f3c810631ed0cf49d1807e5e3b2a20784a..6ec3f5b7869b017700c53db81ced0087b54b3bd5 100644 (file)
@@ -14,6 +14,7 @@
 #![feature(box_syntax)]
 #![feature(unboxed_closures)]
 #![feature(core)]
+#![feature(const_fn)]
 #![feature(test)]
 #![feature(rand)]
 #![feature(unicode)]
index 4c92162b2d6dcc34546a1bd5a95221588c0362f3..15767024ba80fb3eec77a348f1418f0518136edf 100644 (file)
 #![feature(staged_api)]
 #![feature(box_syntax)]
 #![feature(core)]
+#![feature(const_fn)]
 #![feature(std_misc)]
 
 use std::boxed;
index c92bb81c5fb254d841fd0b59a44b1d90e609962b..4a715ca621cc2abf21f52947228667c2eaa978a4 100644 (file)
@@ -29,6 +29,7 @@
 #![feature(box_patterns)]
 #![feature(box_syntax)]
 #![feature(collections)]
+#![feature(const_fn)]
 #![feature(core)]
 #![feature(duration)]
 #![feature(duration_span)]
index 8866e7ff19dccd3247651816d5c2c9ba06b7d11d..f25c6eb21a47b0a364c238af86476a9c9ab158f8 100644 (file)
@@ -30,6 +30,7 @@
 #![feature(box_syntax)]
 #![feature(collections)]
 #![feature(core)]
+#![feature(const_fn)]
 #![feature(libc)]
 #![feature(quote)]
 #![feature(rustc_diagnostic_macros)]
index b347e674f0a9f1995def749c41c9d5ebd2240e72..373fc04217540d3d3ec3665ba6cbcc8310758cce 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(const_fn)]
+
 use std::sync::atomic;
 
 pub const C1: usize = 1;
index c9713ebcebe986dccee88d3b11266d90d7044820..19f790ddc90717875b915d866a5bd7670bfe7ae0 100644 (file)
@@ -13,6 +13,8 @@
 //
 // (Compare against compile-fail/dropck_vec_cycle_checked.rs)
 
+#![feature(const_fn)]
+
 use std::cell::Cell;
 use id::Id;
 
index 9309f5a243cd38408d13987af80cacc2d37f4f5b..584e5eabf0cd8f7e21cee5de46b9ea11bcfac8e3 100644 (file)
@@ -17,6 +17,7 @@
 //  for the error message we see here.)
 
 #![allow(unstable)]
+#![feature(const_fn)]
 
 extern crate arena;
 
index 1d8c7e9ac3e823e7b8647a7d1b0f976976b17180..6e0679da949e1792c3e3881ed0a915175c53511a 100644 (file)
@@ -13,6 +13,8 @@
 //
 // (Compare against compile-fail/dropck_vec_cycle_checked.rs)
 
+#![feature(const_fn)]
+
 use std::cell::Cell;
 use id::Id;
 
index 8722246bb4eaa513f3551d40e2f70411a633c407..bc33ff8399aa5611fd59cd17c55469a61e0fec16 100644 (file)
@@ -12,6 +12,8 @@
 //
 // (Compare against compile-fail/dropck_arr_cycle_checked.rs)
 
+#![feature(const_fn)]
+
 use std::cell::Cell;
 use id::Id;
 
index 3f41401eb69c12275b58d7968e2526f8bc0204d7..d2df0d9ef270204834ffaf8f1d96c204292d30ec 100644 (file)
@@ -10,6 +10,8 @@
 
 // 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;
index 12a9a27463157e5eeab176d17fcb275d94256995..ec6d1141c1a057aff2677424b9393f8884bc888d 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![feature(const_fn)]
+
 use std::cell::UnsafeCell;
 
 const A: UnsafeCell<usize> = UnsafeCell::new(1);
index 999e5f9db2dfc05d5a0c0d9117252fa5f41c69c7..7d0a9007829926e1ea4bb198ffcfd4ef5d0ffa1e 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #![feature(box_syntax)]
+#![feature(const_fn)]
 
 use std::cell::RefCell;
 
index 0b2112edf728069dc39a341a628eb103695a07a8..375289596841d5ae59474d5a80034f71ac5926e3 100644 (file)
@@ -23,6 +23,8 @@
 // conditions above to be satisfied, meaning that if the dropck is
 // sound, it should reject this code.
 
+#![feature(const_fn)]
+
 use std::cell::Cell;
 use id::Id;
 
index 72448ca2e001fc823b0dba9df9b71615e3babdb4..8032b53e9dd7ca4aa8dc21082fb63bc2d46e131c 100644 (file)
@@ -15,6 +15,7 @@
 #![allow(dead_code, unused_variables)]
 #![omit_gdb_pretty_printer_section]
 #![feature(std_misc, core)]
+#![feature(const_fn)]
 
 // This test makes sure that the compiler doesn't crash when trying to assign
 // debug locations to const-expressions.
index 2c3d7ef39e497123ab6ff1c749a20f792c40f1af..b13e34256d2293704864de1db0c3144240b40dd9 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #![allow(dead_code)]
+#![feature(const_fn)]
 
 // check dtor calling order when casting enums.
 
index 5ceb1013ad811dae95339b9f71300b0bac42e718..8dc7d79ec2a7772c5c6d4162cd767d94ac118a2f 100644 (file)
@@ -12,6 +12,8 @@
 // `Item` originates in a where-clause, not the declaration of
 // `T`. Issue #20300.
 
+#![feature(const_fn)]
+
 use std::marker::{PhantomData};
 use std::sync::atomic::{AtomicUsize};
 use std::sync::atomic::Ordering::SeqCst;
index 1c7359a0fad9d40b08480babf181df99a9b3da41..e889d74c7ccc4e85be6317f0087bc3bf66e34c69 100644 (file)
@@ -11,6 +11,8 @@
 // Test that we cleanup a fixed size Box<[D; k]> properly when D has a
 // destructor.
 
+#![feature(const_fn)]
+
 use std::thread;
 use std::sync::atomic::{AtomicUsize, Ordering};
 
index ad781f00356d715c3efc976c521eb9bc2dd13dd8..f108ef4f5d22de94deefff812dc0ceca310bb88c 100644 (file)
@@ -11,6 +11,8 @@
 // Test that we cleanup dynamic sized Box<[D]> properly when D has a
 // destructor.
 
+#![feature(const_fn)]
+
 use std::thread;
 use std::sync::atomic::{AtomicUsize, Ordering};
 
index dc02758fe501d41345108b23259a75ecb9c16cb6..42c7a47c59db1f24791dfa6772a1e90a6c883306 100644 (file)
@@ -10,7 +10,7 @@
 
 #![feature(const_fn)]
 
-struct Foo { val: u32 }
+struct Foo { value: u32 }
 
 impl Foo {
     const fn new() -> Foo {
index c18d51e84d84f5ffaf829318d6df83ebc88a0fef..993e5e1c1e6e90f0eaa8f0f96f79de320ae0634c 100644 (file)
@@ -11,6 +11,8 @@
 // pretty-expanded FIXME #23616
 
 #![feature(core)]
+#![feature(const_fn)]
+
 
 use std::marker;
 use std::cell::UnsafeCell;
index 457bbb23e18204a9e5251bbc6802631581a9115e..2bb69d105ff5d8c50b05836f29e9e330f3a26e90 100644 (file)
@@ -12,6 +12,7 @@
 
 
 #![feature(core)]
+#![feature(const_fn)]
 
 extern crate issue_17718 as other;
 
index c20237f1f86b462aa4c38f31bfbfb60a2f20aec8..699189a4e6aedd88657acc9e56aedbb1b121e14e 100644 (file)
@@ -12,6 +12,7 @@
 // created via FRU and control-flow breaks in the middle of
 // construction.
 
+#![feature(const_fn)]
 
 use std::sync::atomic::{Ordering, AtomicUsize};
 
index e59900caf07ec50be8869c5e1592b4b6b31d93f4..89ac626158392f73f33da2da2c93039add3d0f0b 100644 (file)
@@ -12,6 +12,7 @@
 // the contents implement Drop and we hit a panic in the middle of
 // construction.
 
+#![feature(const_fn)]
 
 use std::thread;
 use std::sync::atomic::{AtomicUsize, Ordering};
index c0ed4ea3ce82f63a7084198ea62d089f61988212..b67eb205396b29cff30bdf088bc3877469b2c534 100644 (file)
@@ -11,6 +11,7 @@
 // Checks that functional-record-update order-of-eval is as expected
 // even when no Drop-implementations are involved.
 
+#![feature(const_fn)]
 
 use std::sync::atomic::{Ordering, AtomicUsize};
 
index 83ea0e3ab74eab2babbfbe933ded8c0ff0113f4e..20d27d8b309bbb9c35795c129ffa4d61c906d7de 100644 (file)
@@ -11,6 +11,7 @@
 // Checks that struct-literal expression order-of-eval is as expected
 // even when no Drop-implementations are involved.
 
+#![feature(const_fn)]
 
 use std::sync::atomic::{Ordering, AtomicUsize};
 
index f3c4ecb035e51da3d76ae5c02e5c07ba869b6a73..209fe22207f49b5386b012c2ff48134a2a5d72f8 100644 (file)
@@ -10,6 +10,7 @@
 
 
 #![feature(rand, core)]
+#![feature(const_fn)]
 
 use std::sync::atomic::{AtomicUsize, Ordering};
 use std::__rand::{thread_rng, Rng};