From a8248976fd43d0d8661ef2839dff4ca320e11e30 Mon Sep 17 00:00:00 2001 From: Alexander Regueiro Date: Fri, 30 Nov 2018 15:48:01 +0000 Subject: Moved feature-gate tests to correct dir. --- src/test/ui/feature-gate-custom_test_frameworks.rs | 13 ------------ .../ui/feature-gate-custom_test_frameworks.stderr | 11 ---------- src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.rs | 14 ------------- .../ui/feature-gate-doc_cfg-cfg-rustdoc.stderr | 11 ---------- src/test/ui/feature-gate-underscore_const_names.rs | 24 ---------------------- .../ui/feature-gate-underscore_const_names.stderr | 16 --------------- src/test/ui/feature-gate-unsized_locals.rs | 15 -------------- src/test/ui/feature-gate-unsized_locals.stderr | 14 ------------- .../feature-gate-custom_test_frameworks.rs | 13 ++++++++++++ .../feature-gate-custom_test_frameworks.stderr | 11 ++++++++++ .../feature-gate-doc_cfg-cfg-rustdoc.rs | 14 +++++++++++++ .../feature-gate-doc_cfg-cfg-rustdoc.stderr | 11 ++++++++++ .../feature-gate-underscore_const_names.rs | 24 ++++++++++++++++++++++ .../feature-gate-underscore_const_names.stderr | 16 +++++++++++++++ .../feature-gates/feature-gate-unsized_locals.rs | 15 ++++++++++++++ .../feature-gate-unsized_locals.stderr | 14 +++++++++++++ 16 files changed, 118 insertions(+), 118 deletions(-) delete mode 100644 src/test/ui/feature-gate-custom_test_frameworks.rs delete mode 100644 src/test/ui/feature-gate-custom_test_frameworks.stderr delete mode 100644 src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.rs delete mode 100644 src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.stderr delete mode 100644 src/test/ui/feature-gate-underscore_const_names.rs delete mode 100644 src/test/ui/feature-gate-underscore_const_names.stderr delete mode 100644 src/test/ui/feature-gate-unsized_locals.rs delete mode 100644 src/test/ui/feature-gate-unsized_locals.stderr create mode 100644 src/test/ui/feature-gates/feature-gate-custom_test_frameworks.rs create mode 100644 src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr create mode 100644 src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.rs create mode 100644 src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr create mode 100644 src/test/ui/feature-gates/feature-gate-underscore_const_names.rs create mode 100644 src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr create mode 100644 src/test/ui/feature-gates/feature-gate-unsized_locals.rs create mode 100644 src/test/ui/feature-gates/feature-gate-unsized_locals.stderr diff --git a/src/test/ui/feature-gate-custom_test_frameworks.rs b/src/test/ui/feature-gate-custom_test_frameworks.rs deleted file mode 100644 index 7c9f7dd0402..00000000000 --- a/src/test/ui/feature-gate-custom_test_frameworks.rs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2017 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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature - -fn main() {} diff --git a/src/test/ui/feature-gate-custom_test_frameworks.stderr b/src/test/ui/feature-gate-custom_test_frameworks.stderr deleted file mode 100644 index bfcbab50067..00000000000 --- a/src/test/ui/feature-gate-custom_test_frameworks.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0658]: custom test frameworks are an unstable feature (see issue #50297) - --> $DIR/feature-gate-custom_test_frameworks.rs:11:1 - | -LL | #![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature - | ^^^^^^^^^^^^^^^^^^^^^ - | - = help: add #![feature(custom_test_frameworks)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.rs b/src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.rs deleted file mode 100644 index 6207d99dc36..00000000000 --- a/src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.rs +++ /dev/null @@ -1,14 +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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#[cfg(rustdoc)] //~ ERROR: `cfg(rustdoc)` is experimental and subject to change -pub struct SomeStruct; - -fn main() {} diff --git a/src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.stderr b/src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.stderr deleted file mode 100644 index be2c263af04..00000000000 --- a/src/test/ui/feature-gate-doc_cfg-cfg-rustdoc.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0658]: `cfg(rustdoc)` is experimental and subject to change (see issue #43781) - --> $DIR/feature-gate-doc_cfg-cfg-rustdoc.rs:11:7 - | -LL | #[cfg(rustdoc)] //~ ERROR: `cfg(rustdoc)` is experimental and subject to change - | ^^^^^^^ - | - = help: add #![feature(doc_cfg)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gate-underscore_const_names.rs b/src/test/ui/feature-gate-underscore_const_names.rs deleted file mode 100644 index b283e286514..00000000000 --- a/src/test/ui/feature-gate-underscore_const_names.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2012-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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -#![feature(const_let)] - -trait Trt {} -struct Str {} - -impl Trt for Str {} - -const _ : () = { - use std::marker::PhantomData; - struct ImplementsTrait(PhantomData); - let _ = ImplementsTrait::(PhantomData); - () -}; - -fn main() {} diff --git a/src/test/ui/feature-gate-underscore_const_names.stderr b/src/test/ui/feature-gate-underscore_const_names.stderr deleted file mode 100644 index ab90ef8f11f..00000000000 --- a/src/test/ui/feature-gate-underscore_const_names.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error[E0658]: naming constants with `_` is unstable (see issue #54912) - --> $DIR/feature-gate-underscore_const_names.rs:17:1 - | -LL | / const _ : () = { -LL | | use std::marker::PhantomData; -LL | | struct ImplementsTrait(PhantomData); -LL | | let _ = ImplementsTrait::(PhantomData); -LL | | () -LL | | }; - | |__^ - | - = help: add #![feature(underscore_const_names)] to the crate attributes to enable - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gate-unsized_locals.rs b/src/test/ui/feature-gate-unsized_locals.rs deleted file mode 100644 index 7f1f22fa38f..00000000000 --- a/src/test/ui/feature-gate-unsized_locals.rs +++ /dev/null @@ -1,15 +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 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -fn f(f: FnOnce()) {} -//~^ ERROR E0277 - -fn main() { -} diff --git a/src/test/ui/feature-gate-unsized_locals.stderr b/src/test/ui/feature-gate-unsized_locals.stderr deleted file mode 100644 index a0440a373d2..00000000000 --- a/src/test/ui/feature-gate-unsized_locals.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error[E0277]: the size for values of type `(dyn std::ops::FnOnce() + 'static)` cannot be known at compilation time - --> $DIR/feature-gate-unsized_locals.rs:11:6 - | -LL | fn f(f: FnOnce()) {} - | ^ doesn't have a size known at compile-time - | - = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::FnOnce() + 'static)` - = note: to learn more, visit - = note: all local variables must have a statically known size - = help: unsized locals are gated as an unstable feature - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0277`. diff --git a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.rs b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.rs new file mode 100644 index 00000000000..7c9f7dd0402 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.rs @@ -0,0 +1,13 @@ +// Copyright 2017 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature + +fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr new file mode 100644 index 00000000000..bfcbab50067 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-custom_test_frameworks.stderr @@ -0,0 +1,11 @@ +error[E0658]: custom test frameworks are an unstable feature (see issue #50297) + --> $DIR/feature-gate-custom_test_frameworks.rs:11:1 + | +LL | #![test_runner(main)] //~ ERROR custom test frameworks are an unstable feature + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_test_frameworks)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.rs b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.rs new file mode 100644 index 00000000000..6207d99dc36 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.rs @@ -0,0 +1,14 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[cfg(rustdoc)] //~ ERROR: `cfg(rustdoc)` is experimental and subject to change +pub struct SomeStruct; + +fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr new file mode 100644 index 00000000000..be2c263af04 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-doc_cfg-cfg-rustdoc.stderr @@ -0,0 +1,11 @@ +error[E0658]: `cfg(rustdoc)` is experimental and subject to change (see issue #43781) + --> $DIR/feature-gate-doc_cfg-cfg-rustdoc.rs:11:7 + | +LL | #[cfg(rustdoc)] //~ ERROR: `cfg(rustdoc)` is experimental and subject to change + | ^^^^^^^ + | + = help: add #![feature(doc_cfg)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-underscore_const_names.rs b/src/test/ui/feature-gates/feature-gate-underscore_const_names.rs new file mode 100644 index 00000000000..b283e286514 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-underscore_const_names.rs @@ -0,0 +1,24 @@ +// Copyright 2012-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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. +#![feature(const_let)] + +trait Trt {} +struct Str {} + +impl Trt for Str {} + +const _ : () = { + use std::marker::PhantomData; + struct ImplementsTrait(PhantomData); + let _ = ImplementsTrait::(PhantomData); + () +}; + +fn main() {} diff --git a/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr b/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr new file mode 100644 index 00000000000..ab90ef8f11f --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-underscore_const_names.stderr @@ -0,0 +1,16 @@ +error[E0658]: naming constants with `_` is unstable (see issue #54912) + --> $DIR/feature-gate-underscore_const_names.rs:17:1 + | +LL | / const _ : () = { +LL | | use std::marker::PhantomData; +LL | | struct ImplementsTrait(PhantomData); +LL | | let _ = ImplementsTrait::(PhantomData); +LL | | () +LL | | }; + | |__^ + | + = help: add #![feature(underscore_const_names)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gates/feature-gate-unsized_locals.rs b/src/test/ui/feature-gates/feature-gate-unsized_locals.rs new file mode 100644 index 00000000000..7f1f22fa38f --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-unsized_locals.rs @@ -0,0 +1,15 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn f(f: FnOnce()) {} +//~^ ERROR E0277 + +fn main() { +} diff --git a/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr new file mode 100644 index 00000000000..a0440a373d2 --- /dev/null +++ b/src/test/ui/feature-gates/feature-gate-unsized_locals.stderr @@ -0,0 +1,14 @@ +error[E0277]: the size for values of type `(dyn std::ops::FnOnce() + 'static)` cannot be known at compilation time + --> $DIR/feature-gate-unsized_locals.rs:11:6 + | +LL | fn f(f: FnOnce()) {} + | ^ doesn't have a size known at compile-time + | + = help: the trait `std::marker::Sized` is not implemented for `(dyn std::ops::FnOnce() + 'static)` + = note: to learn more, visit + = note: all local variables must have a statically known size + = help: unsized locals are gated as an unstable feature + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0277`. -- cgit 1.4.1-3-g733a5