diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/auxiliary/inherited_stability.rs | 2 | ||||
| -rw-r--r-- | src/test/auxiliary/internal_unstable.rs | 10 | ||||
| -rw-r--r-- | src/test/auxiliary/lint_stability.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-17337.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-stability-fields.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-stability.rs | 10 | ||||
| -rw-r--r-- | src/test/compile-fail/missing-stability.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/stability-attribute-sanity-2.rs | 7 | ||||
| -rw-r--r-- | src/test/compile-fail/stability-attribute-sanity.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-18199.rs | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-27759.rs | 2 |
11 files changed, 41 insertions, 3 deletions
diff --git a/src/test/auxiliary/inherited_stability.rs b/src/test/auxiliary/inherited_stability.rs index 60477288f7c..2a3f6aa4962 100644 --- a/src/test/auxiliary/inherited_stability.rs +++ b/src/test/auxiliary/inherited_stability.rs @@ -20,6 +20,7 @@ pub fn stable() {} #[stable(feature = "rust1", since = "1.0.0")] pub mod stable_mod { + #[unstable(feature = "test_feature", issue = "0")] pub fn unstable() {} #[stable(feature = "rust1", since = "1.0.0")] @@ -37,6 +38,7 @@ pub mod unstable_mod { #[stable(feature = "rust1", since = "1.0.0")] pub trait Stable { + #[unstable(feature = "test_feature", issue = "0")] fn unstable(&self); #[stable(feature = "rust1", since = "1.0.0")] diff --git a/src/test/auxiliary/internal_unstable.rs b/src/test/auxiliary/internal_unstable.rs index d9335eb567f..20eb99fe91c 100644 --- a/src/test/auxiliary/internal_unstable.rs +++ b/src/test/auxiliary/internal_unstable.rs @@ -33,12 +33,14 @@ pub struct Bar { pub x: u8 } +#[stable(feature = "stable", since = "1.0.0")] #[allow_internal_unstable] #[macro_export] macro_rules! call_unstable_allow { () => { $crate::unstable() } } +#[stable(feature = "stable", since = "1.0.0")] #[allow_internal_unstable] #[macro_export] macro_rules! construct_unstable_allow { @@ -47,29 +49,34 @@ macro_rules! construct_unstable_allow { } } +#[stable(feature = "stable", since = "1.0.0")] #[allow_internal_unstable] #[macro_export] macro_rules! call_method_allow { ($e: expr) => { $e.method() } } +#[stable(feature = "stable", since = "1.0.0")] #[allow_internal_unstable] #[macro_export] macro_rules! access_field_allow { ($e: expr) => { $e.x } } +#[stable(feature = "stable", since = "1.0.0")] #[allow_internal_unstable] #[macro_export] macro_rules! pass_through_allow { ($e: expr) => { $e } } +#[stable(feature = "stable", since = "1.0.0")] #[macro_export] macro_rules! call_unstable_noallow { () => { $crate::unstable() } } +#[stable(feature = "stable", since = "1.0.0")] #[macro_export] macro_rules! construct_unstable_noallow { ($e: expr) => { @@ -77,16 +84,19 @@ macro_rules! construct_unstable_noallow { } } +#[stable(feature = "stable", since = "1.0.0")] #[macro_export] macro_rules! call_method_noallow { ($e: expr) => { $e.method() } } +#[stable(feature = "stable", since = "1.0.0")] #[macro_export] macro_rules! access_field_noallow { ($e: expr) => { $e.x } } +#[stable(feature = "stable", since = "1.0.0")] #[macro_export] macro_rules! pass_through_noallow { ($e: expr) => { $e } diff --git a/src/test/auxiliary/lint_stability.rs b/src/test/auxiliary/lint_stability.rs index 260361634ae..92c98cb7d35 100644 --- a/src/test/auxiliary/lint_stability.rs +++ b/src/test/auxiliary/lint_stability.rs @@ -93,6 +93,7 @@ pub trait Trait { fn trait_stable_text(&self) {} } +#[stable(feature = "test_feature", since = "1.0.0")] impl Trait for MethodTester {} #[unstable(feature = "test_feature", issue = "0")] @@ -154,16 +155,19 @@ pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub #[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")] #[macro_export] macro_rules! macro_test { () => (deprecated()); } +#[stable(feature = "test_feature", since = "1.0.0")] #[macro_export] macro_rules! macro_test_arg { ($func:expr) => ($func); } +#[stable(feature = "test_feature", since = "1.0.0")] #[macro_export] macro_rules! macro_test_arg_nested { ($func:ident) => (macro_test_arg!($func())); diff --git a/src/test/compile-fail/issue-17337.rs b/src/test/compile-fail/issue-17337.rs index 501f6eb4dea..83146260138 100644 --- a/src/test/compile-fail/issue-17337.rs +++ b/src/test/compile-fail/issue-17337.rs @@ -12,6 +12,8 @@ #![staged_api] #![deny(deprecated)] +#![unstable(feature = "test_feature", issue = "0")] + struct Foo; impl Foo { diff --git a/src/test/compile-fail/lint-stability-fields.rs b/src/test/compile-fail/lint-stability-fields.rs index 11f64119680..35013a13e98 100644 --- a/src/test/compile-fail/lint-stability-fields.rs +++ b/src/test/compile-fail/lint-stability-fields.rs @@ -14,6 +14,8 @@ #![feature(staged_api)] #![staged_api] +#![stable(feature = "rust1", since = "1.0.0")] + mod cross_crate { extern crate lint_stability_fields; diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index 864aafe5a6b..b96f4606880 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -18,6 +18,8 @@ #![feature(staged_api)] #![staged_api] +#![stable(feature = "rust1", since = "1.0.0")] + #[macro_use] extern crate lint_stability; @@ -127,7 +129,9 @@ mod cross_crate { <Foo>::trait_stable_text(&foo); <Foo as Trait>::trait_stable_text(&foo); - let _ = DeprecatedStruct { i: 0 }; //~ ERROR use of deprecated item + let _ = DeprecatedStruct { //~ ERROR use of deprecated item + i: 0 //~ ERROR use of deprecated item + }; let _ = DeprecatedUnstableStruct { //~^ ERROR use of deprecated item //~^^ ERROR use of unstable library feature @@ -475,7 +479,7 @@ mod this_crate { #[deprecated(since = "1.0.0", reason = "text")] fn test_fn_body() { fn fn_in_body() {} - fn_in_body(); + fn_in_body(); //~ ERROR use of deprecated item: text } impl MethodTester { @@ -483,7 +487,7 @@ mod this_crate { #[deprecated(since = "1.0.0", reason = "text")] fn test_method_body(&self) { fn fn_in_body() {} - fn_in_body(); + fn_in_body(); //~ ERROR use of deprecated item: text } } diff --git a/src/test/compile-fail/missing-stability.rs b/src/test/compile-fail/missing-stability.rs index 1f68b7dbf5e..83ba9d95daf 100644 --- a/src/test/compile-fail/missing-stability.rs +++ b/src/test/compile-fail/missing-stability.rs @@ -14,6 +14,8 @@ #![feature(staged_api)] #![staged_api] +#![stable(feature = "test_feature", since = "1.0.0")] + pub fn unmarked() { //~^ ERROR This node does not have a stability attribute () diff --git a/src/test/compile-fail/stability-attribute-sanity-2.rs b/src/test/compile-fail/stability-attribute-sanity-2.rs index cdeff7afe1a..82627daf7ff 100644 --- a/src/test/compile-fail/stability-attribute-sanity-2.rs +++ b/src/test/compile-fail/stability-attribute-sanity-2.rs @@ -13,6 +13,8 @@ #![feature(staged_api)] #![staged_api] +#![stable(feature = "test_feature", since = "1.0.0")] + #[stable(feature = "a", feature = "b", since = "1.0.0")] //~ ERROR multiple 'feature' items fn f1() { } @@ -22,4 +24,9 @@ fn f2() { } #[unstable(feature = "a", issue = "no")] //~ ERROR incorrect 'issue' fn f3() { } +#[macro_export] +macro_rules! mac { //~ ERROR This node does not have a stability attribute + () => () +} + fn main() { } diff --git a/src/test/compile-fail/stability-attribute-sanity.rs b/src/test/compile-fail/stability-attribute-sanity.rs index f71e66ded7e..e53ba3e17dd 100644 --- a/src/test/compile-fail/stability-attribute-sanity.rs +++ b/src/test/compile-fail/stability-attribute-sanity.rs @@ -13,6 +13,8 @@ #![feature(staged_api)] #![staged_api] +#![stable(feature = "rust1", since = "1.0.0")] + mod bogus_attribute_types_1 { #[stable(feature = "a", since = "a", reason)] //~ ERROR unknown meta item 'reason' fn f1() { } diff --git a/src/test/rustdoc/issue-18199.rs b/src/test/rustdoc/issue-18199.rs index 46aac8701fd..27e6e17a79c 100644 --- a/src/test/rustdoc/issue-18199.rs +++ b/src/test/rustdoc/issue-18199.rs @@ -14,6 +14,7 @@ /// ``` /// #![staged_api] +/// #![unstable(feature="test", issue="18199")] /// fn main() {} /// ``` pub fn foo() {} diff --git a/src/test/rustdoc/issue-27759.rs b/src/test/rustdoc/issue-27759.rs index 2d5f97b1f93..dbe12b80b3e 100644 --- a/src/test/rustdoc/issue-27759.rs +++ b/src/test/rustdoc/issue-27759.rs @@ -12,6 +12,8 @@ #![staged_api] #![doc(issue_tracker_base_url = "http://issue_url/")] +#![unstable(feature="test", issue="27759")] + // @has issue_27759/unstable/index.html // @has - '<code>test</code>' // @has - '<a href="http://issue_url/27759">#27759</a>' |
