]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0538.md
Re-use std::sealed::Sealed in os/linux/process.
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0538.md
1 Attribute contains same meta item more than once.
2
3 Erroneous code example:
4
5 ```compile_fail,E0538
6 #[deprecated(
7     since="1.0.0",
8     note="First deprecation note.",
9     note="Second deprecation note." // error: multiple same meta item
10 )]
11 fn deprecated_function() {}
12 ```
13
14 Meta items are the key-value pairs inside of an attribute. Each key may only be
15 used once in each attribute.
16
17 To fix the problem, remove all but one of the meta items with the same key.
18
19 Example:
20
21 ```
22 #[deprecated(
23     since="1.0.0",
24     note="First deprecation note."
25 )]
26 fn deprecated_function() {}
27 ```