diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-11-23 15:08:06 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-11-30 09:43:41 +0100 |
| commit | 52b67b1766014ea73bac605ca643b1ddd69f1bca (patch) | |
| tree | c87a164a77fbcd71f9f5cdd043c9a0741bee1dbd | |
| parent | df2123cff2b1e6e4c7dfc0560ccf0eec3ae67a65 (diff) | |
| download | rust-52b67b1766014ea73bac605ca643b1ddd69f1bca.tar.gz rust-52b67b1766014ea73bac605ca643b1ddd69f1bca.zip | |
Remove a bunch of now-unnecessary `const_let` feature gates
| -rw-r--r-- | src/libcore/lib.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/ctfe/const-fn-destructuring-arg.rs | 26 | ||||
| -rw-r--r-- | src/test/run-pass/ctfe/issue-37550.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/consts/const_let_assign2.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-44056.rs | 16 |
5 files changed, 2 insertions, 47 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 726e891df0c..ae223941778 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -120,7 +120,7 @@ #![feature(const_slice_len)] #![feature(const_str_as_bytes)] #![feature(const_str_len)] -#![feature(const_let)] +#![cfg_attr(stage0, feature(const_let))] #![feature(const_int_rotate)] #![feature(const_int_wrapping)] #![feature(const_int_sign)] diff --git a/src/test/run-pass/ctfe/const-fn-destructuring-arg.rs b/src/test/run-pass/ctfe/const-fn-destructuring-arg.rs deleted file mode 100644 index 88f0d0714f9..00000000000 --- a/src/test/run-pass/ctfe/const-fn-destructuring-arg.rs +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// run-pass -#![allow(dead_code)] - -// test that certain things are disallowed in constant functions - -#![feature(const_fn, const_let)] - -// no destructuring -const fn i(( - a, - b - ): (u32, u32)) -> u32 { - a + b -} - -fn main() {} diff --git a/src/test/run-pass/ctfe/issue-37550.rs b/src/test/run-pass/ctfe/issue-37550.rs index 54e0e83efed..2d278d115d5 100644 --- a/src/test/run-pass/ctfe/issue-37550.rs +++ b/src/test/run-pass/ctfe/issue-37550.rs @@ -12,7 +12,7 @@ #![allow(dead_code)] #![allow(unused_variables)] -#![feature(const_fn, const_let)] +#![feature(const_fn)] const fn x() { let t = true; diff --git a/src/test/ui/consts/const_let_assign2.rs b/src/test/ui/consts/const_let_assign2.rs index 0de7396501a..1c44237e49b 100644 --- a/src/test/ui/consts/const_let_assign2.rs +++ b/src/test/ui/consts/const_let_assign2.rs @@ -1,8 +1,5 @@ // compile-pass -#![feature(const_let)] -#![feature(const_fn)] - pub struct AA { pub data: [u8; 10], } diff --git a/src/test/ui/issues/issue-44056.rs b/src/test/ui/issues/issue-44056.rs deleted file mode 100644 index b2f0e917749..00000000000 --- a/src/test/ui/issues/issue-44056.rs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 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. - -// compile-pass -// only-x86_64 -// no-prefer-dynamic -// compile-flags: -Ctarget-feature=+avx -Clto - -fn main() {} |
