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 or the MIT license +// , 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 or the MIT license +// , 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() { }