Skip to content

Commit 5c7cf83

Browse files
committedOct 30, 2023
Fill in syntactically valid deprecation version in tests
1 parent 1e5b2da commit 5c7cf83

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed
 

‎tests/ui/stability-attribute/stability-attribute-sanity.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ mod missing_version {
4141
fn f2() { }
4242

4343
#[stable(feature = "a", since = "4.4.4")]
44-
#[deprecated(since = "a")] //~ ERROR missing 'note' [E0543]
44+
#[deprecated(since = "5.5.5")] //~ ERROR missing 'note' [E0543]
4545
fn f3() { }
4646
}
4747

@@ -58,8 +58,8 @@ fn multiple2() { }
5858
fn multiple3() { }
5959

6060
#[stable(feature = "e", since = "b")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
61-
#[deprecated(since = "b", note = "text")]
62-
#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes
61+
#[deprecated(since = "5.5.5", note = "text")]
62+
#[deprecated(since = "5.5.5", note = "text")] //~ ERROR multiple `deprecated` attributes
6363
#[rustc_const_unstable(feature = "c", issue = "none")]
6464
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
6565
pub const fn multiple4() { }
@@ -69,7 +69,7 @@ pub const fn multiple4() { }
6969
#[deprecated(since = "invalid", note = "text")]
7070
fn invalid_deprecation_version() {}
7171

72-
#[deprecated(since = "a", note = "text")]
72+
#[deprecated(since = "5.5.5", note = "text")]
7373
fn deprecated_without_unstable_or_stable() { }
7474
//~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute
7575

‎tests/ui/stability-attribute/stability-attribute-sanity.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
error: multiple `deprecated` attributes
22
--> $DIR/stability-attribute-sanity.rs:62:1
33
|
4-
LL | #[deprecated(since = "b", note = "text")]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
4+
LL | #[deprecated(since = "5.5.5", note = "text")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
66
|
77
note: attribute also specified here
88
--> $DIR/stability-attribute-sanity.rs:61:1
99
|
10-
LL | #[deprecated(since = "b", note = "text")]
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10+
LL | #[deprecated(since = "5.5.5", note = "text")]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error[E0541]: unknown meta item 'reason'
1414
--> $DIR/stability-attribute-sanity.rs:8:46
@@ -73,8 +73,8 @@ LL | #[deprecated(note = "a")]
7373
error[E0543]: missing 'note'
7474
--> $DIR/stability-attribute-sanity.rs:44:5
7575
|
76-
LL | #[deprecated(since = "a")]
77-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
76+
LL | #[deprecated(since = "5.5.5")]
77+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7878

7979
error[E0544]: multiple stability levels
8080
--> $DIR/stability-attribute-sanity.rs:49:1
@@ -118,8 +118,8 @@ LL | fn invalid_deprecation_version() {}
118118
error[E0549]: deprecated attribute must be paired with either stable or unstable attribute
119119
--> $DIR/stability-attribute-sanity.rs:72:1
120120
|
121-
LL | #[deprecated(since = "a", note = "text")]
122-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121+
LL | #[deprecated(since = "5.5.5", note = "text")]
122+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123123

124124
error[E0711]: feature `a` is declared stable since 1.0.0, but was previously declared stable since 4.4.4
125125
--> $DIR/stability-attribute-sanity.rs:67:1

0 commit comments

Comments
 (0)