about summary refs log tree commit diff
path: root/src/test/ui/stability-attribute
diff options
context:
space:
mode:
authorDavid Wood <david@davidtw.co>2018-08-08 14:50:16 +0200
committerDavid Wood <david@davidtw.co>2018-08-14 11:12:09 +0200
commit3fc7ab237314a4ce85e612b4ce590c27f1425291 (patch)
treec775f852e05e1272032cb053ee347315c973c7b5 /src/test/ui/stability-attribute
parent3e0a4079884eab5b54489c92f7428cda2797ea5c (diff)
downloadrust-3fc7ab237314a4ce85e612b4ce590c27f1425291.tar.gz
rust-3fc7ab237314a4ce85e612b4ce590c27f1425291.zip
Merged migrated compile-fail tests and ui tests. Fixes #46841.
Diffstat (limited to 'src/test/ui/stability-attribute')
-rw-r--r--src/test/ui/stability-attribute/auxiliary/stability_attribute_issue.rs19
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-issue-43027.rs20
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr8
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-issue.rs24
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-issue.stderr19
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs16
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr20
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-non-staged.rs14
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-non-staged.stderr20
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity-2.rs26
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr22
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity-3.rs22
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr10
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity.rs101
-rw-r--r--src/test/ui/stability-attribute/stability-attribute-sanity.stderr142
15 files changed, 483 insertions, 0 deletions
diff --git a/src/test/ui/stability-attribute/auxiliary/stability_attribute_issue.rs b/src/test/ui/stability-attribute/auxiliary/stability_attribute_issue.rs
new file mode 100644
index 00000000000..1ee623c34fb
--- /dev/null
+++ b/src/test/ui/stability-attribute/auxiliary/stability_attribute_issue.rs
@@ -0,0 +1,19 @@
+// 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.
+
+#![feature(staged_api)]
+#![stable(feature = "stable_test_feature", since = "1.2.0")]
+
+
+#[unstable(feature = "unstable_test_feature", issue = "1")]
+pub fn unstable() {}
+
+#[unstable(feature = "unstable_test_feature", reason = "message", issue = "2")]
+pub fn unstable_msg() {}
diff --git a/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs b/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs
new file mode 100644
index 00000000000..dac50db3fd9
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-issue-43027.rs
@@ -0,0 +1,20 @@
+// 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 <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.
+
+#![feature(staged_api)]
+#![stable(feature = "test", since = "0")]
+
+#[stable(feature = "test", since = "0")]
+pub struct Reverse<T>(pub T); //~ ERROR This node does not have a stability attribute
+
+fn main() {
+    // Make sure the field is used to fill the stability cache
+    Reverse(0).0;
+}
diff --git a/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr b/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr
new file mode 100644
index 00000000000..bdfdd9ccc87
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-issue-43027.stderr
@@ -0,0 +1,8 @@
+error: This node does not have a stability attribute
+  --> $DIR/stability-attribute-issue-43027.rs:15:23
+   |
+LL | pub struct Reverse<T>(pub T); //~ ERROR This node does not have a stability attribute
+   |                       ^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/stability-attribute/stability-attribute-issue.rs b/src/test/ui/stability-attribute/stability-attribute-issue.rs
new file mode 100644
index 00000000000..754c6f792f9
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-issue.rs
@@ -0,0 +1,24 @@
+// Copyright 2013-2014 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.
+
+// aux-build:stability_attribute_issue.rs
+// ignore-tidy-linelength
+
+#![deny(deprecated)]
+
+extern crate stability_attribute_issue;
+use stability_attribute_issue::*;
+
+fn main() {
+    unstable();
+    //~^ ERROR use of unstable library feature 'unstable_test_feature' (see issue #1)
+    unstable_msg();
+    //~^ ERROR use of unstable library feature 'unstable_test_feature': message (see issue #2)
+}
diff --git a/src/test/ui/stability-attribute/stability-attribute-issue.stderr b/src/test/ui/stability-attribute/stability-attribute-issue.stderr
new file mode 100644
index 00000000000..15e91926a73
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-issue.stderr
@@ -0,0 +1,19 @@
+error[E0658]: use of unstable library feature 'unstable_test_feature' (see issue #1)
+  --> $DIR/stability-attribute-issue.rs:20:5
+   |
+LL |     unstable();
+   |     ^^^^^^^^
+   |
+   = help: add #![feature(unstable_test_feature)] to the crate attributes to enable
+
+error[E0658]: use of unstable library feature 'unstable_test_feature': message (see issue #2)
+  --> $DIR/stability-attribute-issue.rs:22:5
+   |
+LL |     unstable_msg();
+   |     ^^^^^^^^^^^^
+   |
+   = help: add #![feature(unstable_test_feature)] to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs b/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.rs
new file mode 100644
index 00000000000..512fb24a0c2
--- /dev/null
+++ b/src/test/ui/stability-attribute/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/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr b/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr
new file mode 100644
index 00000000000..479f2ff5095
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-non-staged-force-unstable.stderr
@@ -0,0 +1,20 @@
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/stability-attribute-non-staged-force-unstable.rs:13:1
+   |
+LL | #[unstable] //~ ERROR: stability attributes may not be used
+   | ^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/stability-attribute-non-staged-force-unstable.rs:14:1
+   |
+LL | #[stable] //~ ERROR: stability attributes may not be used
+   | ^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/stability-attribute-non-staged-force-unstable.rs:15:1
+   |
+LL | #[rustc_deprecated] //~ ERROR: stability attributes may not be used
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/stability-attribute/stability-attribute-non-staged.rs b/src/test/ui/stability-attribute/stability-attribute-non-staged.rs
new file mode 100644
index 00000000000..35256f21f92
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-non-staged.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.
+
+#[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/ui/stability-attribute/stability-attribute-non-staged.stderr b/src/test/ui/stability-attribute/stability-attribute-non-staged.stderr
new file mode 100644
index 00000000000..f2a9879bd10
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-non-staged.stderr
@@ -0,0 +1,20 @@
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/stability-attribute-non-staged.rs:11:1
+   |
+LL | #[unstable] //~ ERROR: stability attributes may not be used
+   | ^^^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/stability-attribute-non-staged.rs:12:1
+   |
+LL | #[stable] //~ ERROR: stability attributes may not be used
+   | ^^^^^^^^^
+
+error: stability attributes may not be used outside of the standard library
+  --> $DIR/stability-attribute-non-staged.rs:13:1
+   |
+LL | #[rustc_deprecated] //~ ERROR: stability attributes may not be used
+   | ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-2.rs b/src/test/ui/stability-attribute/stability-attribute-sanity-2.rs
new file mode 100644
index 00000000000..9c54315bfd0
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-sanity-2.rs
@@ -0,0 +1,26 @@
+// 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.
+
+// More checks that stability attributes are used correctly
+
+#![feature(staged_api)]
+
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
+
+#[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items
+fn f1() { }
+
+#[stable(feature = "a", sinse = "1.0.0")] //~ ERROR unknown meta item 'sinse'
+fn f2() { }
+
+#[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue'
+fn f3() { }
+
+fn main() { }
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr
new file mode 100644
index 00000000000..a9d70e25302
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-sanity-2.stderr
@@ -0,0 +1,22 @@
+error[E0538]: multiple 'feature' items
+  --> $DIR/stability-attribute-sanity-2.rs:17:25
+   |
+LL | #[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items
+   |                         ^^^^^^^^^^^^^
+
+error[E0541]: unknown meta item 'sinse'
+  --> $DIR/stability-attribute-sanity-2.rs:20:25
+   |
+LL | #[stable(feature = "a", sinse = "1.0.0")] //~ ERROR unknown meta item 'sinse'
+   |                         ^^^^^^^^^^^^^^^ expected one of `since`, `note`
+
+error[E0545]: incorrect 'issue'
+  --> $DIR/stability-attribute-sanity-2.rs:23:1
+   |
+LL | #[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue'
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0538, E0541, E0545.
+For more information about an error, try `rustc --explain E0538`.
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-3.rs b/src/test/ui/stability-attribute/stability-attribute-sanity-3.rs
new file mode 100644
index 00000000000..d4821e009f2
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-sanity-3.rs
@@ -0,0 +1,22 @@
+// 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.
+
+// More checks that stability attributes are used correctly
+
+#![feature(staged_api)]
+
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
+
+#[macro_export]
+macro_rules! mac { //~ ERROR This node does not have a stability attribute
+    () => ()
+}
+
+fn main() { }
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr
new file mode 100644
index 00000000000..b5b5847e8e1
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr
@@ -0,0 +1,10 @@
+error: This node does not have a stability attribute
+  --> $DIR/stability-attribute-sanity-3.rs:18:1
+   |
+LL | / macro_rules! mac { //~ ERROR This node does not have a stability attribute
+LL | |     () => ()
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.rs b/src/test/ui/stability-attribute/stability-attribute-sanity.rs
new file mode 100644
index 00000000000..794ae1ca087
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-sanity.rs
@@ -0,0 +1,101 @@
+// 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.
+
+// Various checks that stability attributes are used correctly, per RFC 507
+
+#![feature(const_fn, staged_api, rustc_const_unstable)]
+
+#![stable(feature = "rust1", since = "1.0.0")]
+
+mod bogus_attribute_types_1 {
+    #[stable(feature = "a", since = "b", reason)] //~ ERROR unknown meta item 'reason' [E0541]
+    fn f1() { }
+
+    #[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539]
+    fn f2() { }
+
+    #[stable(feature, since = "a")] //~ ERROR incorrect meta item [E0539]
+    fn f3() { }
+
+    #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539]
+    fn f5() { }
+
+    #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539]
+    fn f6() { }
+}
+
+mod bogus_attribute_types_2 {
+    #[unstable] //~ ERROR incorrect stability attribute type [E0548]
+    fn f1() { }
+
+    #[unstable = "b"] //~ ERROR incorrect stability attribute type [E0548]
+    fn f2() { }
+
+    #[stable] //~ ERROR incorrect stability attribute type [E0548]
+    fn f3() { }
+
+    #[stable = "a"] //~ ERROR incorrect stability attribute type [E0548]
+    fn f4() { }
+
+    #[stable(feature = "a", since = "b")]
+    #[rustc_deprecated] //~ ERROR incorrect stability attribute type [E0548]
+    fn f5() { }
+
+    #[stable(feature = "a", since = "b")]
+    #[rustc_deprecated = "a"] //~ ERROR incorrect stability attribute type [E0548]
+    fn f6() { }
+}
+
+mod missing_feature_names {
+    #[unstable(issue = "0")] //~ ERROR missing 'feature' [E0546]
+    fn f1() { }
+
+    #[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
+    fn f2() { }
+
+    #[stable(since = "a")] //~ ERROR missing 'feature' [E0546]
+    fn f3() { }
+}
+
+mod missing_version {
+    #[stable(feature = "a")] //~ ERROR missing 'since' [E0542]
+    fn f1() { }
+
+    #[stable(feature = "a", since = "b")]
+    #[rustc_deprecated(reason = "a")] //~ ERROR missing 'since' [E0542]
+    fn f2() { }
+}
+
+#[unstable(feature = "b", issue = "0")]
+#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+fn multiple1() { }
+
+#[unstable(feature = "b", issue = "0")]
+#[unstable(feature = "b", issue = "0")] //~ ERROR multiple stability levels [E0544]
+fn multiple2() { }
+
+#[stable(feature = "a", since = "b")]
+#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+fn multiple3() { }
+
+#[stable(feature = "a", since = "b")]
+#[rustc_deprecated(since = "b", reason = "text")]
+#[rustc_deprecated(since = "b", reason = "text")]
+#[rustc_const_unstable(feature = "c")]
+#[rustc_const_unstable(feature = "d")]
+pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540]
+//~^ ERROR Invalid stability or deprecation version found
+//~| ERROR multiple rustc_const_unstable attributes
+
+#[rustc_deprecated(since = "a", reason = "text")]
+fn deprecated_without_unstable_or_stable() { }
+//~^ ERROR rustc_deprecated attribute must be paired with either stable or unstable attribute
+
+fn main() { }
diff --git a/src/test/ui/stability-attribute/stability-attribute-sanity.stderr b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr
new file mode 100644
index 00000000000..f9d301f643d
--- /dev/null
+++ b/src/test/ui/stability-attribute/stability-attribute-sanity.stderr
@@ -0,0 +1,142 @@
+error[E0541]: unknown meta item 'reason'
+  --> $DIR/stability-attribute-sanity.rs:18:42
+   |
+LL |     #[stable(feature = "a", since = "b", reason)] //~ ERROR unknown meta item 'reason' [E0541]
+   |                                          ^^^^^^ expected one of `since`, `note`
+
+error[E0539]: incorrect meta item
+  --> $DIR/stability-attribute-sanity.rs:21:29
+   |
+LL |     #[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539]
+   |                             ^^^^^
+
+error[E0539]: incorrect meta item
+  --> $DIR/stability-attribute-sanity.rs:24:14
+   |
+LL |     #[stable(feature, since = "a")] //~ ERROR incorrect meta item [E0539]
+   |              ^^^^^^^
+
+error[E0539]: incorrect meta item
+  --> $DIR/stability-attribute-sanity.rs:27:29
+   |
+LL |     #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539]
+   |                             ^^^^^^^^
+
+error[E0539]: incorrect meta item
+  --> $DIR/stability-attribute-sanity.rs:30:14
+   |
+LL |     #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539]
+   |              ^^^^^^^^^^
+
+error[E0548]: incorrect stability attribute type
+  --> $DIR/stability-attribute-sanity.rs:35:5
+   |
+LL |     #[unstable] //~ ERROR incorrect stability attribute type [E0548]
+   |     ^^^^^^^^^^^
+
+error[E0548]: incorrect stability attribute type
+  --> $DIR/stability-attribute-sanity.rs:38:5
+   |
+LL |     #[unstable = "b"] //~ ERROR incorrect stability attribute type [E0548]
+   |     ^^^^^^^^^^^^^^^^^
+
+error[E0548]: incorrect stability attribute type
+  --> $DIR/stability-attribute-sanity.rs:41:5
+   |
+LL |     #[stable] //~ ERROR incorrect stability attribute type [E0548]
+   |     ^^^^^^^^^
+
+error[E0548]: incorrect stability attribute type
+  --> $DIR/stability-attribute-sanity.rs:44:5
+   |
+LL |     #[stable = "a"] //~ ERROR incorrect stability attribute type [E0548]
+   |     ^^^^^^^^^^^^^^^
+
+error[E0548]: incorrect stability attribute type
+  --> $DIR/stability-attribute-sanity.rs:48:5
+   |
+LL |     #[rustc_deprecated] //~ ERROR incorrect stability attribute type [E0548]
+   |     ^^^^^^^^^^^^^^^^^^^
+
+error[E0548]: incorrect stability attribute type
+  --> $DIR/stability-attribute-sanity.rs:52:5
+   |
+LL |     #[rustc_deprecated = "a"] //~ ERROR incorrect stability attribute type [E0548]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0546]: missing 'feature'
+  --> $DIR/stability-attribute-sanity.rs:57:5
+   |
+LL |     #[unstable(issue = "0")] //~ ERROR missing 'feature' [E0546]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0547]: missing 'issue'
+  --> $DIR/stability-attribute-sanity.rs:60:5
+   |
+LL |     #[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0546]: missing 'feature'
+  --> $DIR/stability-attribute-sanity.rs:63:5
+   |
+LL |     #[stable(since = "a")] //~ ERROR missing 'feature' [E0546]
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0542]: missing 'since'
+  --> $DIR/stability-attribute-sanity.rs:68:5
+   |
+LL |     #[stable(feature = "a")] //~ ERROR missing 'since' [E0542]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0542]: missing 'since'
+  --> $DIR/stability-attribute-sanity.rs:72:5
+   |
+LL |     #[rustc_deprecated(reason = "a")] //~ ERROR missing 'since' [E0542]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0544]: multiple stability levels
+  --> $DIR/stability-attribute-sanity.rs:77:1
+   |
+LL | #[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0544]: multiple stability levels
+  --> $DIR/stability-attribute-sanity.rs:81:1
+   |
+LL | #[unstable(feature = "b", issue = "0")] //~ ERROR multiple stability levels [E0544]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0544]: multiple stability levels
+  --> $DIR/stability-attribute-sanity.rs:85:1
+   |
+LL | #[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0540]: multiple rustc_deprecated attributes
+  --> $DIR/stability-attribute-sanity.rs:93:1
+   |
+LL | pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0553]: multiple rustc_const_unstable attributes
+  --> $DIR/stability-attribute-sanity.rs:93:1
+   |
+LL | pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: Invalid stability or deprecation version found
+  --> $DIR/stability-attribute-sanity.rs:93:1
+   |
+LL | pub const fn multiple4() { } //~ ERROR multiple rustc_deprecated attributes [E0540]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0549]: rustc_deprecated attribute must be paired with either stable or unstable attribute
+  --> $DIR/stability-attribute-sanity.rs:98:1
+   |
+LL | fn deprecated_without_unstable_or_stable() { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 23 previous errors
+
+Some errors occurred: E0539, E0540, E0541, E0542, E0544, E0546, E0547, E0548, E0549...
+For more information about an error, try `rustc --explain E0539`.