Skip to content

Commit 0ebb044

Browse files
Add long error explanation for E0734
1 parent 68d099a commit 0ebb044

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/librustc/error_codes.rs

+17-1
Original file line numberDiff line numberDiff line change
@@ -2184,6 +2184,23 @@ Examples of erroneous code:
21842184
static X: u32 = 42;
21852185
```
21862186
"##,
2187+
2188+
E0734: r##"
2189+
A stability attribute has been used outside of the standard library.
2190+
2191+
Erroneous code examples:
2192+
2193+
```compile_fail,E0734
2194+
#[rustc_deprecated(since = "b", reason = "text")] // invalid
2195+
#[stable(feature = "a", since = "b")] // invalid
2196+
#[unstable(feature = "b", issue = "0")] // invalid
2197+
fn foo(){}
2198+
```
2199+
2200+
These attributes are meant to only be used by the standard library and are
2201+
rejected in your own crates.
2202+
"##,
2203+
21872204
;
21882205
// E0006, // merged with E0005
21892206
// E0101, // replaced with E0282
@@ -2247,5 +2264,4 @@ static X: u32 = 42;
22472264
E0726, // non-explicit (not `'_`) elided lifetime in unsupported position
22482265
E0727, // `async` generators are not yet supported
22492266
E0728, // `await` must be in an `async` function or block
2250-
E0734, // stability attributes may not be used outside of the standard library
22512267
}

0 commit comments

Comments
 (0)