mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
Improve long explanation for E0546
This commit is contained in:
parent
399b6452b5
commit
0d8a071f98
@ -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…
Reference in New Issue
Block a user