]> git.proxmox.com Git - rustc.git/blame - src/librustc_error_codes/error_codes/E0565.md
New upstream version 1.43.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0565.md
CommitLineData
60c5eb7d
XL
1A literal was used in a built-in attribute that doesn't support literals.
2
3Erroneous code example:
4
74b04a01
XL
5```compile_fail,E0565
6#[repr("C")] // error: meta item in `repr` must be an identifier
7struct Repr {}
8
9fn main() {}
60c5eb7d
XL
10```
11
12Literals in attributes are new and largely unsupported in built-in attributes.
13Work to support literals where appropriate is ongoing. Try using an unquoted
14name instead:
15
16```
74b04a01
XL
17#[repr(C)] // ok!
18struct Repr {}
19
20fn main() {}
60c5eb7d 21```