diff options
| author | Jesus Rubio <jesusprubio@gmail.com> | 2021-02-06 18:27:19 +0100 |
|---|---|---|
| committer | Jesus Rubio <jesusprubio@gmail.com> | 2021-02-06 18:27:19 +0100 |
| commit | 0d8a071f983ee2a9863b2bfa7b73f809a1c9b109 (patch) | |
| tree | 9b0f381383ab9d54fbd553337b90ee1e8f920c51 /compiler/rustc_error_codes/src | |
| parent | 399b6452b5d9982438be208668bc758479f13725 (diff) | |
| download | rust-0d8a071f983ee2a9863b2bfa7b73f809a1c9b109.tar.gz rust-0d8a071f983ee2a9863b2bfa7b73f809a1c9b109.zip | |
Improve long explanation for E0546
Diffstat (limited to 'compiler/rustc_error_codes/src')
| -rw-r--r-- | compiler/rustc_error_codes/src/error_codes/E0546.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0546.md b/compiler/rustc_error_codes/src/error_codes/E0546.md index b2df22c0f8f..c5313490f2e 100644 --- a/compiler/rustc_error_codes/src/error_codes/E0546.md +++ b/compiler/rustc_error_codes/src/error_codes/E0546.md @@ -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() {} ``` |
