]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0547.md
1aa4b354248842e5dbf408fb6cefb563d97f27c2
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0547.md
1 The `issue` value is missing in a stability attribute.
2
3 Erroneous code example:
4
5 ```compile_fail,E0547
6 #![feature(staged_api)]
7 #![stable(since = "1.0.0", feature = "test")]
8
9 #[unstable(feature = "_unstable_fn")] // invalid
10 fn _unstable_fn() {}
11
12 #[rustc_const_unstable(feature = "_unstable_const_fn")] // invalid
13 fn _unstable_const_fn() {}
14 ```
15
16 To fix this issue, you need to provide the `issue` field. Example:
17
18 ```
19 #![feature(staged_api)]
20 #![stable(since = "1.0.0", feature = "test")]
21
22 #[unstable(feature = "_unstable_fn", issue = "none")] // ok!
23 fn _unstable_fn() {}
24
25 #[rustc_const_unstable(
26     feature = "_unstable_const_fn",
27     issue = "none"
28 )] // ok!
29 fn _unstable_const_fn() {}
30 ```
31
32 See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix
33 of the Book and the [Stability attributes][stability-attributes] section of the
34 Rustc Dev Guide for more details.
35
36 [how-rust-made-nightly]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
37 [stability-attributes]: https://rustc-dev-guide.rust-lang.org/stability.html