Add #![feature(staged_api)]
attribute to E0539 error examples
This commit is contained in:
parent
e4ee172ab0
commit
9536567210
@ -3,6 +3,8 @@ An invalid meta-item was used inside an attribute.
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0539
|
||||
#![feature(staged_api)]
|
||||
|
||||
#[rustc_deprecated(reason)] // error!
|
||||
#[unstable(feature = "deprecated_fn", issue = "123")]
|
||||
fn deprecated() {}
|
||||
@ -24,6 +26,8 @@ Meta items are the key-value pairs inside of an attribute.
|
||||
To fix these issues you need to give required key-value pairs.
|
||||
|
||||
```
|
||||
#![feature(staged_api)]
|
||||
|
||||
#[rustc_deprecated(since = "1.39.0", reason = "reason")] // ok!
|
||||
#[unstable(feature = "deprecated_fn", issue = "123")]
|
||||
fn deprecated() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user