diff options
Diffstat (limited to 'src/test')
17 files changed, 6 insertions, 90 deletions
diff --git a/src/test/compile-fail/auxiliary/empty-struct.rs b/src/test/compile-fail/auxiliary/empty-struct.rs index dcbb0ce178b..4a302865634 100644 --- a/src/test/compile-fail/auxiliary/empty-struct.rs +++ b/src/test/compile-fail/auxiliary/empty-struct.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(relaxed_adts)] - pub struct XEmpty1 {} pub struct XEmpty2; pub struct XEmpty6(); diff --git a/src/test/compile-fail/auxiliary/namespace-mix-new.rs b/src/test/compile-fail/auxiliary/namespace-mix-new.rs index 88e8b0d56fe..d42c0ee1a4d 100644 --- a/src/test/compile-fail/auxiliary/namespace-mix-new.rs +++ b/src/test/compile-fail/auxiliary/namespace-mix-new.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(item_like_imports, relaxed_adts)] +#![feature(item_like_imports)] pub mod c { pub struct S {} diff --git a/src/test/compile-fail/auxiliary/namespace-mix-old.rs b/src/test/compile-fail/auxiliary/namespace-mix-old.rs index 7bbba7163b5..29b139d771b 100644 --- a/src/test/compile-fail/auxiliary/namespace-mix-old.rs +++ b/src/test/compile-fail/auxiliary/namespace-mix-old.rs @@ -10,8 +10,6 @@ // FIXME: Remove when `item_like_imports` is stabilized. -#![feature(relaxed_adts)] - pub mod c { pub struct S {} pub struct TS(); diff --git a/src/test/compile-fail/empty-struct-braces-pat-2.rs b/src/test/compile-fail/empty-struct-braces-pat-2.rs index 58e3ca6b3ac..4349e72c5d7 100644 --- a/src/test/compile-fail/empty-struct-braces-pat-2.rs +++ b/src/test/compile-fail/empty-struct-braces-pat-2.rs @@ -12,8 +12,6 @@ // aux-build:empty-struct.rs -#![feature(relaxed_adts)] - extern crate empty_struct; use empty_struct::*; diff --git a/src/test/compile-fail/empty-struct-braces-pat-3.rs b/src/test/compile-fail/empty-struct-braces-pat-3.rs index 1960eca9f80..d6c5b953492 100644 --- a/src/test/compile-fail/empty-struct-braces-pat-3.rs +++ b/src/test/compile-fail/empty-struct-braces-pat-3.rs @@ -12,8 +12,6 @@ // aux-build:empty-struct.rs -#![feature(relaxed_adts)] - extern crate empty_struct; use empty_struct::*; diff --git a/src/test/compile-fail/empty-struct-tuple-pat.rs b/src/test/compile-fail/empty-struct-tuple-pat.rs index f15c126a126..5e683eafade 100644 --- a/src/test/compile-fail/empty-struct-tuple-pat.rs +++ b/src/test/compile-fail/empty-struct-tuple-pat.rs @@ -12,8 +12,6 @@ // aux-build:empty-struct.rs -#![feature(relaxed_adts)] - extern crate empty_struct; use empty_struct::*; diff --git a/src/test/compile-fail/empty-struct-unit-pat.rs b/src/test/compile-fail/empty-struct-unit-pat.rs index 90f6ae5755f..532c2d85053 100644 --- a/src/test/compile-fail/empty-struct-unit-pat.rs +++ b/src/test/compile-fail/empty-struct-unit-pat.rs @@ -12,8 +12,6 @@ // aux-build:empty-struct.rs -#![feature(relaxed_adts)] - extern crate empty_struct; use empty_struct::*; diff --git a/src/test/compile-fail/feature-gate-relaxed-adts-2.rs b/src/test/compile-fail/feature-gate-relaxed-adts-2.rs deleted file mode 100644 index a75f2647f49..00000000000 --- a/src/test/compile-fail/feature-gate-relaxed-adts-2.rs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2016 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. - -struct Z(u8, u8); - -enum E { - U(u8, u8), -} - -fn main() { - match Z(0, 1) { - Z{..} => {} //~ ERROR tuple structs and variants in struct patterns are unstable - } - match E::U(0, 1) { - E::U{..} => {} //~ ERROR tuple structs and variants in struct patterns are unstable - } - - let z1 = Z(0, 1); - let z2 = Z { ..z1 }; //~ ERROR tuple structs and variants in struct patterns are unstable -} diff --git a/src/test/compile-fail/issue-16819.rs b/src/test/compile-fail/issue-16819.rs deleted file mode 100644 index 4301b47f2e9..00000000000 --- a/src/test/compile-fail/issue-16819.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. - -struct TS ( //~ ERROR empty tuple structs and enum variants are unstable - #[cfg(untrue)] - i32, -); - -enum E { - TV ( //~ ERROR empty tuple structs and enum variants are unstable - #[cfg(untrue)] - i32, - ) -} - -fn main() { - let s = TS; - let tv = E::TV; -} diff --git a/src/test/compile-fail/issue-17800.rs b/src/test/compile-fail/issue-17800.rs index d5f1614c14d..f7cae91aa93 100644 --- a/src/test/compile-fail/issue-17800.rs +++ b/src/test/compile-fail/issue-17800.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(relaxed_adts)] - enum MyOption<T> { MySome(T), MyNone, diff --git a/src/test/compile-fail/issue-4736.rs b/src/test/compile-fail/issue-4736.rs index c93e75042dd..19803079d02 100644 --- a/src/test/compile-fail/issue-4736.rs +++ b/src/test/compile-fail/issue-4736.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(relaxed_adts)] - struct NonCopyable(()); fn main() { diff --git a/src/test/compile-fail/namespace-mix-new.rs b/src/test/compile-fail/namespace-mix-new.rs index 0abe8bd4390..59592e3d737 100644 --- a/src/test/compile-fail/namespace-mix-new.rs +++ b/src/test/compile-fail/namespace-mix-new.rs @@ -10,7 +10,7 @@ // aux-build:namespace-mix-new.rs -#![feature(item_like_imports, relaxed_adts)] +#![feature(item_like_imports)] extern crate namespace_mix_new; use namespace_mix_new::*; diff --git a/src/test/compile-fail/namespace-mix-old.rs b/src/test/compile-fail/namespace-mix-old.rs index ad676644196..8cd82050814 100644 --- a/src/test/compile-fail/namespace-mix-old.rs +++ b/src/test/compile-fail/namespace-mix-old.rs @@ -12,8 +12,6 @@ // aux-build:namespace-mix-old.rs -#![feature(relaxed_adts)] - extern crate namespace_mix_old; use namespace_mix_old::{xm1, xm2, xm3, xm4, xm5, xm6, xm7, xm8, xm9, xmA, xmB, xmC}; diff --git a/src/test/compile-fail/feature-gate-relaxed-adts.rs b/src/test/compile-fail/numeric-fields-feature-gate.rs index dc5e347aadf..3ce85813a9b 100644 --- a/src/test/compile-fail/feature-gate-relaxed-adts.rs +++ b/src/test/compile-fail/numeric-fields-feature-gate.rs @@ -8,19 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -struct S(); //~ ERROR empty tuple structs and enum variants are unstable -struct Z(u8, u8); - -enum E { - V(), //~ ERROR empty tuple structs and enum variants are unstable - U(u8, u8), -} +struct S(u8); fn main() { - match S() { - S() => {} //~ ERROR empty tuple structs patterns are unstable - } - match E::V() { - E::V() => {} //~ ERROR empty tuple structs patterns are unstable + let s = S{0: 10}; //~ ERROR numeric fields in struct expressions are unstable + match s { + S{0: a, ..} => {} //~ ERROR numeric fields in struct patterns are unstable } } diff --git a/src/test/run-pass-fulldeps/empty-struct-braces-derive.rs b/src/test/run-pass-fulldeps/empty-struct-braces-derive.rs index 66ffff94333..79ce3cb68d4 100644 --- a/src/test/run-pass-fulldeps/empty-struct-braces-derive.rs +++ b/src/test/run-pass-fulldeps/empty-struct-braces-derive.rs @@ -10,7 +10,6 @@ // `#[derive(Trait)]` works for empty structs/variants with braces or parens. -#![feature(relaxed_adts)] #![feature(rustc_private)] extern crate serialize as rustc_serialize; diff --git a/src/test/run-pass/auxiliary/empty-struct.rs b/src/test/run-pass/auxiliary/empty-struct.rs index b599d7bee73..734e57a774d 100644 --- a/src/test/run-pass/auxiliary/empty-struct.rs +++ b/src/test/run-pass/auxiliary/empty-struct.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(relaxed_adts)] - pub struct XEmpty1 {} pub struct XEmpty2; pub struct XEmpty7(); diff --git a/src/test/run-pass/empty-struct-braces.rs b/src/test/run-pass/empty-struct-braces.rs index 48966f24a2e..7c161ba8dd9 100644 --- a/src/test/run-pass/empty-struct-braces.rs +++ b/src/test/run-pass/empty-struct-braces.rs @@ -13,8 +13,6 @@ // aux-build:empty-struct.rs -#![feature(relaxed_adts)] - extern crate empty_struct; use empty_struct::*; |
