File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2,16 +2,20 @@ A literal was used in a built-in attribute that doesn't support literals.
22
33Erroneous code example:
44
5- ``` ignore (compile_fail not working here; see Issue #43707)
6- #[inline("always")] // error: unsupported literal
7- pub fn something() {}
5+ ``` compile_fail,E0565
6+ #[repr("C")] // error: meta item in `repr` must be an identifier
7+ struct Repr {}
8+
9+ fn main() {}
810```
911
1012Literals in attributes are new and largely unsupported in built-in attributes.
1113Work to support literals where appropriate is ongoing. Try using an unquoted
1214name instead:
1315
1416```
15- #[inline(always)]
16- pub fn something() {}
17+ #[repr(C)] // ok!
18+ struct Repr {}
19+
20+ fn main() {}
1721```
You can’t perform that action at this time.
0 commit comments