1 An invalid meta-item was used inside an attribute.
3 Erroneous code example:
6 #![feature(staged_api)]
7 #![stable(since = "1.0.0", feature = "test")]
9 #[rustc_deprecated(reason)] // error!
10 #[unstable(feature = "deprecated_fn", issue = "123")]
13 #[unstable(feature = "unstable_struct", issue)] // error!
16 #[rustc_const_unstable(feature)] // error!
17 const fn unstable_fn() {}
19 #[stable(feature = "stable_struct", since)] // error!
22 #[rustc_const_stable(feature)] // error!
23 const fn stable_fn() {}
26 Meta items are the key-value pairs inside of an attribute.
27 To fix these issues you need to give required key-value pairs.
30 #![feature(staged_api)]
31 #![stable(since = "1.0.0", feature = "test")]
33 #[rustc_deprecated(since = "1.39.0", reason = "reason")] // ok!
34 #[unstable(feature = "deprecated_fn", issue = "123")]
37 #[unstable(feature = "unstable_struct", issue = "123")] // ok!
40 #[rustc_const_unstable(feature = "unstable_fn", issue = "124")] // ok!
41 const fn unstable_fn() {}
43 #[stable(feature = "stable_struct", since = "1.39.0")] // ok!
46 #[rustc_const_stable(feature = "stable_fn", since = "1.39.0")] // ok!
47 const fn stable_fn() {}