Lost text re-added

This commit is contained in:
Jesus Rubio 2021-02-09 14:09:19 +01:00
parent 4d33d41ef3
commit 7b84b62d29
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,14 @@
The `issue` value is missing in a stability attribute.
Erroneous code example:
```compile_fail,E0547
#![feature(staged_api)]
#![stable(since = "1.0.0", feature = "test")]
#[unstable(feature = "_unstable_fn")] // invalid
fn _unstable_fn() {}
#[rustc_const_unstable(feature = "_unstable_const_fn")] // invalid
fn _unstable_const_fn() {}
```
@ -10,8 +18,10 @@ To fix the issue you need to provide the `issue` field.
```
#![feature(staged_api)]
#![stable(since = "1.0.0", feature = "test")]
#[unstable(feature = "_unstable_fn", issue = "none")] // ok!
fn _unstable_fn() {}
#[rustc_const_unstable(
feature = "_unstable_const_fn",
issue = "none"