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