Improve long explanation for E0546

This commit is contained in:
Jesus Rubio 2021-02-06 18:27:19 +01:00
parent 399b6452b5
commit 0d8a071f98

View File

@ -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() {}
```