diff options
| author | Ralf Jung <post@ralfj.de> | 2017-08-20 15:30:15 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2017-08-20 16:57:17 +0200 |
| commit | 350434370d72bd29cd7ba190b34f2734ca4f314a (patch) | |
| tree | 84e8af3780217c71eba2b5106f5ce2c5451df51c | |
| parent | fe895bfb90bd6185cb43ee16b5b22149f8e13990 (diff) | |
| download | rust-350434370d72bd29cd7ba190b34f2734ca4f314a.tar.gz rust-350434370d72bd29cd7ba190b34f2734ca4f314a.zip | |
Test staging attributes when -Zforce-unstable-if-unmarked is set
Both new tests currently fail
| -rw-r--r-- | src/test/compile-fail/stability-attribute-non-staged-force-unstable.rs | 16 | ||||
| -rw-r--r-- | src/test/run-pass/deprecation-in-force-unstable.rs | 14 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/test/compile-fail/stability-attribute-non-staged-force-unstable.rs b/src/test/compile-fail/stability-attribute-non-staged-force-unstable.rs new file mode 100644 index 00000000000..512fb24a0c2 --- /dev/null +++ b/src/test/compile-fail/stability-attribute-non-staged-force-unstable.rs @@ -0,0 +1,16 @@ +// 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. + +// compile-flags:-Zforce-unstable-if-unmarked + +#[unstable] //~ ERROR: stability attributes may not be used +#[stable] //~ ERROR: stability attributes may not be used +#[rustc_deprecated] //~ ERROR: stability attributes may not be used +fn main() { } diff --git a/src/test/run-pass/deprecation-in-force-unstable.rs b/src/test/run-pass/deprecation-in-force-unstable.rs new file mode 100644 index 00000000000..542117eca12 --- /dev/null +++ b/src/test/run-pass/deprecation-in-force-unstable.rs @@ -0,0 +1,14 @@ +// 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. + +// compile-flags:-Zforce-unstable-if-unmarked + +#[deprecated] // should work even with -Zforce-unstable-if-unmarked +fn main() { } |
