Fill in syntactically valid deprecation version in tests
This commit is contained in:
parent
1e5b2da94b
commit
5c7cf83739
@ -41,7 +41,7 @@ fn f1() { }
|
||||
fn f2() { }
|
||||
|
||||
#[stable(feature = "a", since = "4.4.4")]
|
||||
#[deprecated(since = "a")] //~ ERROR missing 'note' [E0543]
|
||||
#[deprecated(since = "5.5.5")] //~ ERROR missing 'note' [E0543]
|
||||
fn f3() { }
|
||||
}
|
||||
|
||||
@ -58,8 +58,8 @@ fn multiple2() { }
|
||||
fn multiple3() { }
|
||||
|
||||
#[stable(feature = "e", since = "b")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
|
||||
#[deprecated(since = "b", note = "text")]
|
||||
#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes
|
||||
#[deprecated(since = "5.5.5", note = "text")]
|
||||
#[deprecated(since = "5.5.5", note = "text")] //~ ERROR multiple `deprecated` attributes
|
||||
#[rustc_const_unstable(feature = "c", issue = "none")]
|
||||
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
|
||||
pub const fn multiple4() { }
|
||||
@ -69,7 +69,7 @@ pub const fn multiple4() { }
|
||||
#[deprecated(since = "invalid", note = "text")]
|
||||
fn invalid_deprecation_version() {}
|
||||
|
||||
#[deprecated(since = "a", note = "text")]
|
||||
#[deprecated(since = "5.5.5", note = "text")]
|
||||
fn deprecated_without_unstable_or_stable() { }
|
||||
//~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
error: multiple `deprecated` attributes
|
||||
--> $DIR/stability-attribute-sanity.rs:62:1
|
||||
|
|
||||
LL | #[deprecated(since = "b", note = "text")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||
LL | #[deprecated(since = "5.5.5", note = "text")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
||||
|
|
||||
note: attribute also specified here
|
||||
--> $DIR/stability-attribute-sanity.rs:61:1
|
||||
|
|
||||
LL | #[deprecated(since = "b", note = "text")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[deprecated(since = "5.5.5", note = "text")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0541]: unknown meta item 'reason'
|
||||
--> $DIR/stability-attribute-sanity.rs:8:46
|
||||
@ -73,8 +73,8 @@ LL | #[deprecated(note = "a")]
|
||||
error[E0543]: missing 'note'
|
||||
--> $DIR/stability-attribute-sanity.rs:44:5
|
||||
|
|
||||
LL | #[deprecated(since = "a")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[deprecated(since = "5.5.5")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0544]: multiple stability levels
|
||||
--> $DIR/stability-attribute-sanity.rs:49:1
|
||||
@ -118,8 +118,8 @@ LL | fn invalid_deprecation_version() {}
|
||||
error[E0549]: deprecated attribute must be paired with either stable or unstable attribute
|
||||
--> $DIR/stability-attribute-sanity.rs:72:1
|
||||
|
|
||||
LL | #[deprecated(since = "a", note = "text")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | #[deprecated(since = "5.5.5", note = "text")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0711]: feature `a` is declared stable since 1.0.0, but was previously declared stable since 4.4.4
|
||||
--> $DIR/stability-attribute-sanity.rs:67:1
|
||||
|
Loading…
Reference in New Issue
Block a user