1 The `since` value is missing in a stability attribute.
3 Erroneous code example:
6 #![feature(staged_api)]
7 #![stable(since = "1.0.0", feature = "test")]
9 #[stable(feature = "_stable_fn")] // invalid
12 #[rustc_const_stable(feature = "_stable_const_fn")] // invalid
13 const fn _stable_const_fn() {}
15 #[stable(feature = "_deprecated_fn", since = "0.1.0")]
17 reason = "explanation for deprecation"
19 fn _deprecated_fn() {}
22 To fix this issue, you need to provide the `since` field. Example:
25 #![feature(staged_api)]
26 #![stable(since = "1.0.0", feature = "test")]
28 #[stable(feature = "_stable_fn", since = "1.0.0")] // ok!
31 #[rustc_const_stable(feature = "_stable_const_fn", since = "1.0.0")] // ok!
32 const fn _stable_const_fn() {}
34 #[stable(feature = "_deprecated_fn", since = "0.1.0")]
37 reason = "explanation for deprecation"
39 fn _deprecated_fn() {}
42 See the [How Rust is Made and “Nightly Rust”][how-rust-made-nightly] appendix
43 of the Book and the [Stability attributes][stability-attributes] section of the
44 Rustc Dev Guide for more details.
46 [how-rust-made-nightly]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
47 [stability-attributes]: https://rustc-dev-guide.rust-lang.org/stability.html