]> git.lizzy.rs Git - rust.git/commitdiff
Fix test/compile-fail
authorvarkor <github@varkor.com>
Mon, 23 Jul 2018 11:22:23 +0000 (12:22 +0100)
committervarkor <github@varkor.com>
Sun, 5 Aug 2018 14:54:49 +0000 (15:54 +0100)
25 files changed:
src/librustc/middle/lib_features.rs
src/test/compile-fail/auxiliary/inherited_stability.rs
src/test/compile-fail/auxiliary/lint_output_format.rs
src/test/compile-fail/auxiliary/lint_stability.rs
src/test/compile-fail/auxiliary/lint_stability_fields.rs
src/test/compile-fail/auxiliary/stability_attribute_issue.rs
src/test/compile-fail/auxiliary/stability_cfg2.rs
src/test/compile-fail/deprecation-in-staged-api.rs
src/test/compile-fail/enable-unstable-lib-feature.rs
src/test/compile-fail/issue-28075.rs
src/test/compile-fail/issue-28388-3.rs
src/test/compile-fail/lint-renamed-cmdline.rs
src/test/compile-fail/lint-renamed.rs
src/test/compile-fail/lint-stability-2.rs
src/test/compile-fail/lint-stability-deprecated.rs
src/test/compile-fail/lint-stability-fields-deprecated.rs
src/test/compile-fail/lint-stability-fields.rs
src/test/compile-fail/lint-stability.rs
src/test/compile-fail/missing-stability.rs
src/test/compile-fail/stability-attribute-issue.rs
src/test/compile-fail/stability-attribute-sanity-2.rs
src/test/compile-fail/stability-attribute-sanity-3.rs
src/test/compile-fail/stability-attribute-sanity.rs
src/test/compile-fail/stable-features.rs
src/test/run-make-fulldeps/allow-warnings-cmdline-stability/bar.rs

index 78c95fcbc6240128afc075453c7a398e857d3467..a1abfb704ec15fa692677d94fc910ad8f573bbf7 100644 (file)
@@ -66,7 +66,9 @@ fn extract(&self, attrs: &[Attribute]) -> Vec<(Symbol, Option<Symbol>, Span)> {
 
             // Find a stability attribute (i.e. `#[stable (..)]`, `#[unstable (..)]`,
             // `#[rustc_const_unstable (..)]`).
-            if stab_attrs.iter().any(|stab_attr| attr.check_name(stab_attr)) {
+            if let Some(stab_attr) = stab_attrs.iter().find(|stab_attr| {
+                attr.check_name(stab_attr)
+            }) {
                 let meta_item = attr.meta();
                 if let Some(MetaItem { node: MetaItemKind::List(ref metas), .. }) = meta_item {
                     let mut feature = None;
@@ -82,7 +84,12 @@ fn extract(&self, attrs: &[Attribute]) -> Vec<(Symbol, Option<Symbol>, Span)> {
                         }
                     }
                     if let Some(feature) = feature {
-                        features.push((feature, since, attr.span));
+                        // This additional check for stability is to make sure we
+                        // don't emit additional, irrelevant errors for malformed
+                        // attributes.
+                        if *stab_attr != "stable" || since.is_some() {
+                            features.push((feature, since, attr.span));
+                        }
                     }
                     // We need to iterate over the other attributes, because
                     // `rustc_const_unstable` is not mutually exclusive with
index 0b1aee68f44927b2ec1a9625b0b3f2d5a8ce1ef8..f690cbd029d5fc59ff81f2a484111a1e5ca9b471 100644 (file)
@@ -9,7 +9,7 @@
 // except according to those terms.
 #![crate_name="inherited_stability"]
 #![crate_type = "lib"]
-#![unstable(feature = "test_feature", issue = "0")]
+#![unstable(feature = "unstable_test_feature", issue = "0")]
 #![feature(staged_api)]
 
 pub fn unstable() {}
@@ -19,16 +19,16 @@ pub fn stable() {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 pub mod stable_mod {
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub fn unstable() {}
 
     #[stable(feature = "rust1", since = "1.0.0")]
     pub fn stable() {}
 }
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub mod unstable_mod {
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated() {}
 
@@ -37,7 +37,7 @@ pub fn unstable() {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait Stable {
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     fn unstable(&self);
 
     #[stable(feature = "rust1", since = "1.0.0")]
index 0553b4a49b7aed9fc08ea927a9ea56fd6e041426..6ba66f3e45fece9f5e7e0eec334526d6ac6278fe 100644 (file)
 #![crate_name="lint_output_format"]
 #![crate_type = "lib"]
 #![feature(staged_api)]
-#![unstable(feature = "test_feature", issue = "0")]
+#![unstable(feature = "unstable_test_feature", issue = "0")]
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub fn foo() -> usize {
     20
 }
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub fn bar() -> usize {
     40
 }
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub fn baz() -> usize {
     30
 }
index 07e80b61cd0a69cc764a016b88c15c940a9efe3d..5547458abbef8e1a8fd281adc66f9751af639e02 100644 (file)
 #![feature(associated_type_defaults)]
 #![stable(feature = "lint_stability", since = "1.0.0")]
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub fn deprecated() {}
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub fn deprecated_text() {}
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "99.99.99", reason = "text")]
 pub fn deprecated_future() {}
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub fn deprecated_unstable() {}
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub fn deprecated_unstable_text() {}
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub fn unstable() {}
-#[unstable(feature = "test_feature", reason = "text", issue = "0")]
+#[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
 pub fn unstable_text() {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -46,23 +46,23 @@ pub fn stable_text() {}
 pub struct MethodTester;
 
 impl MethodTester {
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn method_deprecated(&self) {}
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn method_deprecated_text(&self) {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn method_deprecated_unstable(&self) {}
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn method_deprecated_unstable_text(&self) {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub fn method_unstable(&self) {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
     pub fn method_unstable_text(&self) {}
 
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -71,25 +71,25 @@ pub fn method_stable(&self) {}
     pub fn method_stable_text(&self) {}
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 pub trait Trait {
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn trait_deprecated(&self) {}
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn trait_deprecated_text(&self) {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn trait_deprecated_unstable(&self) {}
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn trait_deprecated_unstable_text(&self) {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     fn trait_unstable(&self) {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
     fn trait_unstable_text(&self) {}
 
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -98,100 +98,100 @@ fn trait_stable(&self) {}
     fn trait_stable_text(&self) {}
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 pub trait TraitWithAssociatedTypes {
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     type TypeUnstable = u8;
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     type TypeDeprecated = u8;
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 impl Trait for MethodTester {}
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub trait UnstableTrait { fn dummy(&self) { } }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub trait DeprecatedTrait {
-    #[stable(feature = "test_feature", since = "1.0.0")] fn dummy(&self) { }
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] fn dummy(&self) { }
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct DeprecatedStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
 }
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct DeprecatedUnstableStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
 }
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub struct UnstableStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
 }
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct StableStruct {
-    #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
+    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
 }
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub enum UnstableEnum {}
 #[stable(feature = "rust1", since = "1.0.0")]
 pub enum StableEnum {}
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct DeprecatedUnitStruct;
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct DeprecatedUnstableUnitStruct;
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub struct UnstableUnitStruct;
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct StableUnitStruct;
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 pub enum Enum {
-    #[stable(feature = "test_feature", since = "1.0.0")]
+    #[stable(feature = "stable_test_feature", since = "1.0.0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     DeprecatedVariant,
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     DeprecatedUnstableVariant,
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     UnstableVariant,
 
     #[stable(feature = "rust1", since = "1.0.0")]
     StableVariant,
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[macro_export]
 macro_rules! macro_test {
     () => (deprecated());
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[macro_export]
 macro_rules! macro_test_arg {
     ($func:expr) => ($func);
 }
 
-#[stable(feature = "test_feature", since = "1.0.0")]
+#[stable(feature = "stable_test_feature", since = "1.0.0")]
 #[macro_export]
 macro_rules! macro_test_arg_nested {
     ($func:ident) => (macro_test_arg!($func()));
index 8c6b98ab5104195e027c2bfa49803fce7293722f..6b79c36fc0587ea9c663edcf0a458eef5e47e314 100644 (file)
 pub struct Stable {
     #[stable(feature = "rust1", since = "1.0.0")]
     pub inherit: u8, // it's a lie (stable doesn't inherit)
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub override1: u8,
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub override2: u8,
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8,
-                   #[unstable(feature = "test_feature", issue = "0")] pub u8,
-                   #[unstable(feature = "test_feature", issue = "0")]
+                   #[unstable(feature = "unstable_test_feature", issue = "0")] pub u8,
+                   #[unstable(feature = "unstable_test_feature", issue = "0")]
                    #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub struct Unstable {
     pub inherit: u8,
     #[stable(feature = "rust1", since = "1.0.0")]
     pub override1: u8,
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub override2: u8,
 }
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub struct Unstable2(pub u8,
                      #[stable(feature = "rust1", since = "1.0.0")] pub u8,
-                     #[unstable(feature = "test_feature", issue = "0")]
+                     #[unstable(feature = "unstable_test_feature", issue = "0")]
                      #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct Deprecated {
     pub inherit: u8,
     #[stable(feature = "rust1", since = "1.0.0")]
     pub override1: u8,
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub override2: u8,
 }
 
-#[unstable(feature = "test_feature", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 #[rustc_deprecated(since = "1.0.0", reason = "text")]
 pub struct Deprecated2(pub u8,
                        #[stable(feature = "rust1", since = "1.0.0")] pub u8,
-                       #[unstable(feature = "test_feature", issue = "0")] pub u8);
+                       #[unstable(feature = "unstable_test_feature", issue = "0")] pub u8);
index 22c13f69af96db0f3ff30c13b2c55ec4508c324f..1ee623c34fb48d9cd6333de6074da3e33b45b38e 100644 (file)
@@ -9,11 +9,11 @@
 // except according to those terms.
 
 #![feature(staged_api)]
-#![stable(feature = "foo", since = "1.2.0")]
+#![stable(feature = "stable_test_feature", since = "1.2.0")]
 
 
-#[unstable(feature = "foo", issue = "1")]
+#[unstable(feature = "unstable_test_feature", issue = "1")]
 pub fn unstable() {}
 
-#[unstable(feature = "foo", reason = "message", issue = "2")]
+#[unstable(feature = "unstable_test_feature", reason = "message", issue = "2")]
 pub fn unstable_msg() {}
index c1e2b1d1bfe12af2a81e560bd788a96256cec919..a59f4b4e8f44b9760b72452564435acd3a4f6f6b 100644 (file)
@@ -10,6 +10,6 @@
 
 // compile-flags:--cfg foo
 
-#![cfg_attr(foo, unstable(feature = "test_feature", issue = "0"))]
+#![cfg_attr(foo, unstable(feature = "unstable_test_feature", issue = "0"))]
 #![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
 #![feature(staged_api)]
index 8170c9fd8f161db0ebf4bceafd079d94576c804c..5c6facbf01436ad6abf05e175638236c49a83ace 100644 (file)
@@ -12,7 +12,7 @@
 
 #![feature(staged_api)]
 
-#![stable(feature = "test_feature", since = "1.0.0")]
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
 
 #[deprecated]
 fn main() { } //~ERROR `#[deprecated]` cannot be used in staged api
index bc9e2345f0ebb57a098ea525585f98da4d8ecd1b..b10a0a60f1471598562f94b9b4a1e9a53aec50b6 100644 (file)
@@ -12,7 +12,7 @@
 
 // aux-build:stability_cfg2.rs
 
-#![feature(test_feature)]
+#![feature(unstable_test_feature)]
 #![deny(non_snake_case)] // To trigger a hard error
 
 // Shouldn't generate a warning about unstable features
index 057c99f930510aa9a6add482b10a499f1b550991..0f6b9d1b5dc4fc5a6c6a893b440090b02b267f57 100644 (file)
@@ -16,7 +16,8 @@
 
 extern crate lint_stability;
 
-use lint_stability::{unstable, deprecated}; //~ ERROR use of unstable library feature 'test_feature'
+use lint_stability::{unstable, deprecated};
+//~^ ERROR use of unstable library feature 'unstable_test_feature'
 
 fn main() {
 }
index 12357779b5171e3b7ae5e5a144f0621edf43dcdf..12e3457ef9e34c0b5817a34a7ee98dccd0178710 100644 (file)
@@ -14,7 +14,8 @@
 
 extern crate lint_stability;
 
-use lint_stability::UnstableEnum::{}; //~ ERROR use of unstable library feature 'test_feature'
+use lint_stability::UnstableEnum::{};
+//~^ ERROR use of unstable library feature 'unstable_test_feature'
 use lint_stability::StableEnum::{}; // OK
 
 fn main() {}
index a5246206d9504726872fd4e565c5cf536eb6010d..f5abf2733b97793c28e64d8229daaf30f565cd5f 100644 (file)
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// compile-flags:-D unknown_features
+// compile-flags:-D bare_trait_object
 
-// error-pattern:lint `unknown_features` has been renamed to `unused_features`
-// error-pattern:requested on the command line with `-D unknown_features`
+// error-pattern:lint `bare_trait_object` has been renamed to `bare_trait_objects`
+// error-pattern:requested on the command line with `-D bare_trait_object`
 // error-pattern:unused
 
 #[deny(unused)]
index afe4aee7a1d947ef43394060654f99090464cf41..c147ec5cf95052dd35e7e99e5ded2148b9f1bb4d 100644 (file)
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#[deny(unknown_features)] //~ WARN lint `unknown_features` has been renamed to `unused_features`
+#[deny(bare_trait_object)]
+//~^ WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
 #[deny(unused)]
 fn main() { let unused = (); } //~ ERROR unused
index 77917ff3cd3e5c9c456d77898690106d0e1a6497..1f2fa077cafc8292a6d82590091d7e2739c28cce 100644 (file)
@@ -76,15 +76,15 @@ fn test() {
         <Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
 
         foo.method_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         Foo::method_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         <Foo>::method_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         foo.trait_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         <Foo>::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
 
         stable();
         foo.method_stable();
@@ -149,9 +149,9 @@ fn test_method_param<Foo: Trait>(foo: Foo) {
         foo.trait_unstable(); //~ ERROR use of unstable library feature
         <Foo>::trait_unstable(&foo); //~ ERROR use of unstable library feature
         foo.trait_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         <Foo>::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         foo.trait_stable();
         Trait::trait_stable(&foo);
         <Foo>::trait_stable(&foo);
@@ -167,7 +167,7 @@ fn test_method_object(foo: &Trait) {
         //~^ ERROR use of unstable library feature
         foo.trait_unstable(); //~ ERROR use of unstable library feature
         foo.trait_unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         foo.trait_stable();
     }
 
@@ -178,16 +178,16 @@ trait LocalTrait2 : DeprecatedTrait { }
 }
 
 mod this_crate {
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated() {}
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated_text() {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub fn unstable() {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
     pub fn unstable_text() {}
 
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -199,16 +199,16 @@ pub fn stable_text() {}
     pub struct MethodTester;
 
     impl MethodTester {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         pub fn method_deprecated(&self) {}
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         pub fn method_deprecated_text(&self) {}
 
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         pub fn method_unstable(&self) {}
-        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
         pub fn method_unstable_text(&self) {}
 
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -218,16 +218,16 @@ pub fn method_stable_text(&self) {}
     }
 
     pub trait Trait {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn trait_deprecated(&self) {}
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn trait_deprecated_text(&self) {}
 
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         fn trait_unstable(&self) {}
-        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
         fn trait_unstable_text(&self) {}
 
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -238,43 +238,43 @@ fn trait_stable_text(&self) {}
 
     impl Trait for MethodTester {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedUnitStruct;
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableUnitStruct;
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableUnitStruct;
 
     pub enum Enum {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         DeprecatedVariant,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         UnstableVariant,
 
         #[stable(feature = "rust1", since = "1.0.0")]
         StableVariant,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedTupleStruct(isize);
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableTupleStruct(isize);
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableTupleStruct(isize);
@@ -391,7 +391,7 @@ fn test_method_object(foo: &Trait) {
         foo.trait_stable();
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn test_fn_body() {
         fn fn_in_body() {}
@@ -399,7 +399,7 @@ fn fn_in_body() {}
     }
 
     impl MethodTester {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn test_method_body(&self) {
             fn fn_in_body() {}
@@ -407,7 +407,7 @@ fn fn_in_body() {}
         }
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub trait DeprecatedTrait {
         fn dummy(&self) { }
index f2defc1d421b09f8e587411f8b03d0d8ceb0dd64..de2c27bdcbcca690fc1c03337780db68b29566ce 100644 (file)
@@ -16,7 +16,7 @@
 
 #![warn(deprecated)]
 #![allow(dead_code, unused_extern_crates)]
-#![feature(staged_api, test_feature, rustc_attrs)]
+#![feature(staged_api, unstable_test_feature, rustc_attrs)]
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
@@ -227,16 +227,16 @@ fn test_inheritance() {
 }
 
 mod this_crate {
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated() {}
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated_text() {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub fn unstable() {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
     pub fn unstable_text() {}
 
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -248,16 +248,16 @@ pub fn stable_text() {}
     pub struct MethodTester;
 
     impl MethodTester {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         pub fn method_deprecated(&self) {}
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         pub fn method_deprecated_text(&self) {}
 
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         pub fn method_unstable(&self) {}
-        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
         pub fn method_unstable_text(&self) {}
 
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -267,16 +267,16 @@ pub fn method_stable_text(&self) {}
     }
 
     pub trait Trait {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn trait_deprecated(&self) {}
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn trait_deprecated_text(&self) {}
 
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         fn trait_unstable(&self) {}
-        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
         fn trait_unstable_text(&self) {}
 
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -287,43 +287,43 @@ fn trait_stable_text(&self) {}
 
     impl Trait for MethodTester {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedUnitStruct;
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableUnitStruct;
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableUnitStruct;
 
     pub enum Enum {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         DeprecatedVariant,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         UnstableVariant,
 
         #[stable(feature = "rust1", since = "1.0.0")]
         StableVariant,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedTupleStruct(isize);
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableTupleStruct(isize);
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableTupleStruct(isize);
@@ -441,7 +441,7 @@ fn test_method_object(foo: &Trait) {
         foo.trait_stable();
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn test_fn_body() {
         fn fn_in_body() {}
@@ -449,7 +449,7 @@ fn fn_in_body() {}
     }
 
     impl MethodTester {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn test_method_body(&self) {
             fn fn_in_body() {}
@@ -457,7 +457,7 @@ fn fn_in_body() {}
         }
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub trait DeprecatedTrait {
         fn dummy(&self) { }
index 5da3e1a930d7dd6e98fc7119fc506399f422fd72..0ad4466d0e271142071cae0b9a1dbf9ab4ffe289 100644 (file)
@@ -9,9 +9,10 @@
 // except according to those terms.
 
 // aux-build:lint_stability_fields.rs
+
 #![deny(deprecated)]
 #![allow(dead_code)]
-#![feature(staged_api, test_feature)]
+#![feature(staged_api, unstable_test_feature)]
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
@@ -162,50 +163,50 @@ mod this_crate {
     #[stable(feature = "rust1", since = "1.0.0")]
     struct Stable {
         inherit: u8,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override1: u8,
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override2: u8,
     }
 
     #[stable(feature = "rust1", since = "1.0.0")]
     struct Stable2(u8,
                    #[stable(feature = "rust1", since = "1.0.0")] u8,
-                   #[unstable(feature = "test_feature", issue = "0")]
+                   #[unstable(feature = "unstable_test_feature", issue = "0")]
                    #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     struct Unstable {
         inherit: u8,
         #[stable(feature = "rust1", since = "1.0.0")]
         override1: u8,
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override2: u8,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     struct Unstable2(u8,
                      #[stable(feature = "rust1", since = "1.0.0")] u8,
-                     #[unstable(feature = "test_feature", issue = "0")]
+                     #[unstable(feature = "unstable_test_feature", issue = "0")]
                      #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     struct Deprecated {
         inherit: u8,
         #[stable(feature = "rust1", since = "1.0.0")]
         override1: u8,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override2: u8,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     struct Deprecated2(u8,
                        #[stable(feature = "rust1", since = "1.0.0")] u8,
-                       #[unstable(feature = "test_feature", issue = "0")] u8);
+                       #[unstable(feature = "unstable_test_feature", issue = "0")] u8);
 
     pub fn foo() {
         let x = Stable {
index b1b1a9a1fbf8e7d5789f4e155f89e7b26c866f25..db6b64dabfe4b446dc4eabc897e23c2c63f7d254 100644 (file)
@@ -138,50 +138,50 @@ mod this_crate {
     #[stable(feature = "rust1", since = "1.0.0")]
     struct Stable {
         inherit: u8,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override1: u8,
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override2: u8,
     }
 
     #[stable(feature = "rust1", since = "1.0.0")]
     struct Stable2(u8,
                    #[stable(feature = "rust1", since = "1.0.0")] u8,
-                   #[unstable(feature = "test_feature", issue = "0")]
+                   #[unstable(feature = "unstable_test_feature", issue = "0")]
                    #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     struct Unstable {
         inherit: u8,
         #[stable(feature = "rust1", since = "1.0.0")]
         override1: u8,
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override2: u8,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     struct Unstable2(u8,
                      #[stable(feature = "rust1", since = "1.0.0")] u8,
-                     #[unstable(feature = "test_feature", issue = "0")]
+                     #[unstable(feature = "unstable_test_feature", issue = "0")]
                      #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     struct Deprecated {
         inherit: u8,
         #[stable(feature = "rust1", since = "1.0.0")]
         override1: u8,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         override2: u8,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     struct Deprecated2(u8,
                        #[stable(feature = "rust1", since = "1.0.0")] u8,
-                       #[unstable(feature = "test_feature", issue = "0")] u8);
+                       #[unstable(feature = "unstable_test_feature", issue = "0")] u8);
 
     pub fn foo() {
         let x = Stable {
index bd390108bd8f3c40468fc1e122bae926a345f8c3..720b1235d47f684c45d5bfe307ce99816a94e7f7 100644 (file)
@@ -71,11 +71,11 @@ fn test() {
         <Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
 
         unstable_text();
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         Trait::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         <Foo as Trait>::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
 
         stable();
         foo.method_stable();
@@ -162,9 +162,9 @@ fn test_method_param<Foo: Trait>(foo: Foo) {
         Trait::trait_unstable(&foo); //~ ERROR use of unstable library feature
         <Foo as Trait>::trait_unstable(&foo); //~ ERROR use of unstable library feature
         Trait::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         <Foo as Trait>::trait_unstable_text(&foo);
-        //~^ ERROR use of unstable library feature 'test_feature': text
+        //~^ ERROR use of unstable library feature 'unstable_test_feature': text
         foo.trait_stable();
         Trait::trait_stable(&foo);
         <Foo>::trait_stable(&foo);
@@ -213,10 +213,10 @@ fn test_inheritance() {
 }
 
 mod this_crate {
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated() {}
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub fn deprecated_text() {}
 
@@ -224,9 +224,9 @@ pub fn deprecated_text() {}
     #[rustc_deprecated(since = "99.99.99", reason = "text")]
     pub fn deprecated_future() {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub fn unstable() {}
-    #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
     pub fn unstable_text() {}
 
     #[stable(feature = "rust1", since = "1.0.0")]
@@ -238,16 +238,16 @@ pub fn stable_text() {}
     pub struct MethodTester;
 
     impl MethodTester {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         pub fn method_deprecated(&self) {}
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         pub fn method_deprecated_text(&self) {}
 
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         pub fn method_unstable(&self) {}
-        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
         pub fn method_unstable_text(&self) {}
 
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -257,16 +257,16 @@ pub fn method_stable_text(&self) {}
     }
 
     pub trait Trait {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn trait_deprecated(&self) {}
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn trait_deprecated_text(&self) {}
 
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         fn trait_unstable(&self) {}
-        #[unstable(feature = "test_feature", reason = "text", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
         fn trait_unstable_text(&self) {}
 
         #[stable(feature = "rust1", since = "1.0.0")]
@@ -277,43 +277,43 @@ fn trait_stable_text(&self) {}
 
     impl Trait for MethodTester {}
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableStruct {
-        #[stable(feature = "test_feature", since = "1.0.0")] i: isize
+        #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedUnitStruct;
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableUnitStruct;
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableUnitStruct;
 
     pub enum Enum {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         DeprecatedVariant,
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         UnstableVariant,
 
         #[stable(feature = "rust1", since = "1.0.0")]
         StableVariant,
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub struct DeprecatedTupleStruct(isize);
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     pub struct UnstableTupleStruct(isize);
     #[stable(feature = "rust1", since = "1.0.0")]
     pub struct StableTupleStruct(isize);
@@ -432,7 +432,7 @@ fn test_method_object(foo: &Trait) {
         foo.trait_stable();
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     fn test_fn_body() {
         fn fn_in_body() {}
@@ -440,7 +440,7 @@ fn fn_in_body() {}
     }
 
     impl MethodTester {
-        #[unstable(feature = "test_feature", issue = "0")]
+        #[unstable(feature = "unstable_test_feature", issue = "0")]
         #[rustc_deprecated(since = "1.0.0", reason = "text")]
         fn test_method_body(&self) {
             fn fn_in_body() {}
@@ -448,7 +448,7 @@ fn fn_in_body() {}
         }
     }
 
-    #[unstable(feature = "test_feature", issue = "0")]
+    #[unstable(feature = "unstable_test_feature", issue = "0")]
     #[rustc_deprecated(since = "1.0.0", reason = "text")]
     pub trait DeprecatedTrait {
         fn dummy(&self) { }
index a727ecc76b7beb9481ecd32d0f5ef0185feaa8b2..1922efb5e19dc379b04b7e3a455bcda7ff0eef61 100644 (file)
 #![crate_type="lib"]
 #![feature(staged_api)]
 
-#![stable(feature = "test_feature", since = "1.0.0")]
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
 
 pub fn unmarked() {
     //~^ ERROR This node does not have a stability attribute
     ()
 }
 
-#[unstable(feature = "foo", issue = "0")]
+#[unstable(feature = "unstable_test_feature", issue = "0")]
 pub mod foo {
     // #[unstable] is inherited
     pub fn unmarked() {}
 }
 
-#[stable(feature = "bar", since="1.0.0")]
+#[stable(feature = "stable_test_feature", since="1.0.0")]
 pub mod bar {
     // #[stable] is not inherited
     pub fn unmarked() {}
index c473bdd23b5c40000b3f45e946b8c74470baeef7..754c6f792f95dc5e594e14cb584735683243c3db 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 // aux-build:stability_attribute_issue.rs
+// ignore-tidy-linelength
 
 #![deny(deprecated)]
 
@@ -16,6 +17,8 @@
 use stability_attribute_issue::*;
 
 fn main() {
-    unstable(); //~ ERROR use of unstable library feature 'foo' (see issue #1)
-    unstable_msg(); //~ ERROR use of unstable library feature 'foo': message (see issue #2)
+    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)
 }
index 0ddc3a8dcebb8cd8f64d676a070025057a827d81..9c54315bfd0045a55eea0d09b606beb35de0cee9 100644 (file)
@@ -12,7 +12,7 @@
 
 #![feature(staged_api)]
 
-#![stable(feature = "test_feature", since = "1.0.0")]
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
 
 #[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items
 fn f1() { }
index ddefd24b92fd9f8091167c65fdc6f9b633d0ef6b..d4821e009f22353077940792a573e1a50290f8a1 100644 (file)
@@ -12,7 +12,7 @@
 
 #![feature(staged_api)]
 
-#![stable(feature = "test_feature", since = "1.0.0")]
+#![stable(feature = "stable_test_feature", since = "1.0.0")]
 
 #[macro_export]
 macro_rules! mac { //~ ERROR This node does not have a stability attribute
index 263ac427b7676a25a11f5979c9061584bb677f72..794ae1ca08707a1a5f2d0f194fef16c70a2f5e5d 100644 (file)
@@ -15,7 +15,7 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 
 mod bogus_attribute_types_1 {
-    #[stable(feature = "a", since = "a", reason)] //~ ERROR unknown meta item 'reason' [E0541]
+    #[stable(feature = "a", since = "b", reason)] //~ ERROR unknown meta item 'reason' [E0541]
     fn f1() { }
 
     #[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539]
@@ -35,7 +35,7 @@ mod bogus_attribute_types_2 {
     #[unstable] //~ ERROR incorrect stability attribute type [E0548]
     fn f1() { }
 
-    #[unstable = "a"] //~ ERROR incorrect stability attribute type [E0548]
+    #[unstable = "b"] //~ ERROR incorrect stability attribute type [E0548]
     fn f2() { }
 
     #[stable] //~ ERROR incorrect stability attribute type [E0548]
@@ -57,7 +57,7 @@ mod missing_feature_names {
     #[unstable(issue = "0")] //~ ERROR missing 'feature' [E0546]
     fn f1() { }
 
-    #[unstable(feature = "a")] //~ ERROR missing 'issue' [E0547]
+    #[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
     fn f2() { }
 
     #[stable(since = "a")] //~ ERROR missing 'feature' [E0546]
@@ -73,12 +73,12 @@ fn f1() { }
     fn f2() { }
 }
 
-#[unstable(feature = "a", issue = "0")]
+#[unstable(feature = "b", issue = "0")]
 #[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
 fn multiple1() { }
 
-#[unstable(feature = "a", issue = "0")]
-#[unstable(feature = "a", issue = "0")] //~ ERROR multiple stability levels [E0544]
+#[unstable(feature = "b", issue = "0")]
+#[unstable(feature = "b", issue = "0")] //~ ERROR multiple stability levels [E0544]
 fn multiple2() { }
 
 #[stable(feature = "a", since = "b")]
@@ -88,8 +88,8 @@ fn multiple3() { }
 #[stable(feature = "a", since = "b")]
 #[rustc_deprecated(since = "b", reason = "text")]
 #[rustc_deprecated(since = "b", reason = "text")]
-#[rustc_const_unstable(feature = "a")]
-#[rustc_const_unstable(feature = "b")]
+#[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
index 5993f4b5a0941add1e740afb04eb490c68f2e6b2..32991dd6499b5ceaaad0175bd1a109ffa13a3ac4 100644 (file)
 
 #![deny(stable_features)]
 
-#![feature(test_accepted_feature)] //~ ERROR this feature has been stable since 1.0.0
+#![feature(test_accepted_feature)]
+//~^ ERROR the feature `test_accepted_feature` has been stable since 1.0.0
 
-// FIXME(#44232) we should error that this isn't used.
 #![feature(rust1)]
+//~^ ERROR the feature `rust1` has been stable since 1.0.0
 
 fn main() {
     let _foo: Vec<()> = Vec::new();
index fed1405b7f4d284f447af620ce070efa4918fb1d..5eb62316d81fbfc3c8888c0f5273a9f845ca2b4a 100644 (file)
@@ -10,6 +10,6 @@
 
 #![crate_type = "lib"]
 #![feature(staged_api)]
-#![unstable(feature = "test_feature", issue = "0")]
+#![unstable(feature = "unstable_test_feature", issue = "0")]
 
 pub fn baz() { }