Fill in syntactically valid deprecation version in tests

This commit is contained in:
David Tolnay 2023-10-29 22:25:13 -07:00
parent 1e5b2da94b
commit 5c7cf83739
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 12 additions and 12 deletions

View File

@ -41,7 +41,7 @@ fn f1() { }
fn f2() { } fn f2() { }
#[stable(feature = "a", since = "4.4.4")] #[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() { } fn f3() { }
} }
@ -58,8 +58,8 @@ fn multiple2() { }
fn multiple3() { } fn multiple3() { }
#[stable(feature = "e", since = "b")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0" #[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 = "5.5.5", note = "text")]
#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes #[deprecated(since = "5.5.5", note = "text")] //~ ERROR multiple `deprecated` attributes
#[rustc_const_unstable(feature = "c", issue = "none")] #[rustc_const_unstable(feature = "c", issue = "none")]
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels #[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
pub const fn multiple4() { } pub const fn multiple4() { }
@ -69,7 +69,7 @@ pub const fn multiple4() { }
#[deprecated(since = "invalid", note = "text")] #[deprecated(since = "invalid", note = "text")]
fn invalid_deprecation_version() {} fn invalid_deprecation_version() {}
#[deprecated(since = "a", note = "text")] #[deprecated(since = "5.5.5", note = "text")]
fn deprecated_without_unstable_or_stable() { } fn deprecated_without_unstable_or_stable() { }
//~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute //~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute

View File

@ -1,14 +1,14 @@
error: multiple `deprecated` attributes error: multiple `deprecated` attributes
--> $DIR/stability-attribute-sanity.rs:62:1 --> $DIR/stability-attribute-sanity.rs:62:1
| |
LL | #[deprecated(since = "b", note = "text")] LL | #[deprecated(since = "5.5.5", note = "text")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
| |
note: attribute also specified here note: attribute also specified here
--> $DIR/stability-attribute-sanity.rs:61:1 --> $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' error[E0541]: unknown meta item 'reason'
--> $DIR/stability-attribute-sanity.rs:8:46 --> $DIR/stability-attribute-sanity.rs:8:46
@ -73,8 +73,8 @@ LL | #[deprecated(note = "a")]
error[E0543]: missing 'note' error[E0543]: missing 'note'
--> $DIR/stability-attribute-sanity.rs:44:5 --> $DIR/stability-attribute-sanity.rs:44:5
| |
LL | #[deprecated(since = "a")] LL | #[deprecated(since = "5.5.5")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0544]: multiple stability levels error[E0544]: multiple stability levels
--> $DIR/stability-attribute-sanity.rs:49:1 --> $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 error[E0549]: deprecated attribute must be paired with either stable or unstable attribute
--> $DIR/stability-attribute-sanity.rs:72:1 --> $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 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 --> $DIR/stability-attribute-sanity.rs:67:1