Skip to content

Commit 7b0e315

Browse files
committed
Update stability attribute sanity UI test to delete superfluous errors
1 parent ddcb183 commit 7b0e315

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ fn multiple3() { }
6060
#[stable(feature = "e", since = "b")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
6161
#[deprecated(since = "b", note = "text")]
6262
#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes
63-
//~^ ERROR deprecated attribute must be paired with either stable or unstable attribute
6463
#[rustc_const_unstable(feature = "c", issue = "none")]
6564
#[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
66-
pub const fn multiple4() { } //~ ERROR function has missing stability attribute
65+
pub const fn multiple4() { }
6766

6867
#[stable(feature = "a", since = "1.0.0")] //~ ERROR invalid deprecation version found
6968
//~^ ERROR feature `a` is declared stable since 1.0.0

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

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,13 @@ LL | #[stable(feature = "e", since = "b")]
101101
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102102

103103
error[E0544]: multiple stability levels
104-
--> $DIR/stability-attribute-sanity.rs:65:1
104+
--> $DIR/stability-attribute-sanity.rs:64:1
105105
|
106106
LL | #[rustc_const_unstable(feature = "d", issue = "none")]
107107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108108

109-
error[E0549]: deprecated attribute must be paired with either stable or unstable attribute
110-
--> $DIR/stability-attribute-sanity.rs:62:1
111-
|
112-
LL | #[deprecated(since = "b", note = "text")]
113-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114-
115109
error: invalid deprecation version found
116-
--> $DIR/stability-attribute-sanity.rs:68:1
110+
--> $DIR/stability-attribute-sanity.rs:67:1
117111
|
118112
LL | #[stable(feature = "a", since = "1.0.0")]
119113
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid deprecation version
@@ -122,24 +116,18 @@ LL | fn invalid_deprecation_version() {}
122116
| ----------------------------------- the stability attribute annotates this item
123117

124118
error[E0549]: deprecated attribute must be paired with either stable or unstable attribute
125-
--> $DIR/stability-attribute-sanity.rs:73:1
119+
--> $DIR/stability-attribute-sanity.rs:72:1
126120
|
127121
LL | #[deprecated(since = "a", note = "text")]
128122
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129123

130-
error: function has missing stability attribute
131-
--> $DIR/stability-attribute-sanity.rs:66:1
132-
|
133-
LL | pub const fn multiple4() { }
134-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
135-
136124
error[E0711]: feature `a` is declared stable since 1.0.0, but was previously declared stable since 4.4.4
137-
--> $DIR/stability-attribute-sanity.rs:68:1
125+
--> $DIR/stability-attribute-sanity.rs:67:1
138126
|
139127
LL | #[stable(feature = "a", since = "1.0.0")]
140128
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141129

142-
error: aborting due to 22 previous errors
130+
error: aborting due to 20 previous errors
143131

144132
Some errors have detailed explanations: E0539, E0541, E0542, E0543, E0544, E0546, E0547, E0549, E0711.
145133
For more information about an error, try `rustc --explain E0539`.

0 commit comments

Comments
 (0)