]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0551.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0551.md
1 An invalid meta-item was used inside an attribute.
2
3 Erroneous code example:
4
5 ```compile_fail,E0551
6 #[deprecated(note)] // error!
7 fn i_am_deprecated() {}
8 ```
9
10 Meta items are the key-value pairs inside of an attribute. To fix this issue,
11 you need to give a value to the `note` key. Example:
12
13 ```
14 #[deprecated(note = "because")] // ok!
15 fn i_am_deprecated() {}
16 ```