Improve long explanation for E0546
This commit is contained in:
parent
399b6452b5
commit
0d8a071f98
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
A feature name is missing.
|
||||
The `feature` value is missing in a stability attribute.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
|
@ -13,15 +13,15 @@ fn unstable_fn() {}
|
|||
fn stable_fn() {}
|
||||
```
|
||||
|
||||
To fix the issue you need to provide a feature name.
|
||||
To fix the issue you need to provide the `feature` field.
|
||||
|
||||
```
|
||||
#![feature(staged_api)]
|
||||
#![stable(since = "1.0.0", feature = "test")]
|
||||
|
||||
#[unstable(feature = "unstable_fn", issue = "none")] // ok!
|
||||
#[unstable(feature = "unstable_fn", issue = "none")]
|
||||
fn unstable_fn() {}
|
||||
|
||||
#[stable(feature = "stable_fn", since = "1.0.0")] // ok!
|
||||
#[stable(feature = "stable_fn", since = "1.0.0")]
|
||||
fn stable_fn() {}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue