We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0e294cf + 64450ac commit 7ef5b89Copy full SHA for 7ef5b89
src/librustc_error_codes/error_codes/E0565.md
@@ -2,16 +2,20 @@ A literal was used in a built-in attribute that doesn't support literals.
2
3
Erroneous code example:
4
5
-```ignore (compile_fail not working here; see Issue #43707)
6
-#[inline("always")] // error: unsupported literal
7
-pub fn something() {}
+```compile_fail,E0565
+#[repr("C")] // error: meta item in `repr` must be an identifier
+struct Repr {}
8
+
9
+fn main() {}
10
```
11
12
Literals in attributes are new and largely unsupported in built-in attributes.
13
Work to support literals where appropriate is ongoing. Try using an unquoted
14
name instead:
15
16
-#[inline(always)]
17
+#[repr(C)] // ok!
18
19
20
21
0 commit comments