about summary refs log tree commit diff
path: root/tests/ui/attributes/malformed-reprs.stderr
blob: 43085b9c3415ce53d952df530c7c329e5519ed81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
error[E0539]: malformed `repr` attribute input
  --> $DIR/malformed-reprs.rs:4:1
   |
LL | #![repr]
   | ^^^^^^^^ expected this to be a list
   |
   = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
help: try changing it to one of the following valid forms of the attribute
   |
LL - #![repr]
LL + #[repr(<integer type>)]
   |
LL - #![repr]
LL + #[repr(C)]
   |
LL - #![repr]
LL + #[repr(Rust)]
   |
LL - #![repr]
LL + #[repr(align(...))]
   |
   = and 2 other candidates

error[E0589]: invalid `repr(align)` attribute: not a power of two
  --> $DIR/malformed-reprs.rs:9:14
   |
LL | #[repr(align(0))]
   |              ^

error: `repr` attribute cannot be used at crate level
  --> $DIR/malformed-reprs.rs:4:1
   |
LL | #![repr]
   | ^^^^^^^^
...
LL | enum Foo {}
   |      --- the inner attribute doesn't annotate this enum
   |
help: perhaps you meant to use an outer attribute
   |
LL - #![repr]
LL + #[repr]
   |

error[E0084]: unsupported representation for zero-variant enum
  --> $DIR/malformed-reprs.rs:9:1
   |
LL | #[repr(align(0))]
   | ^^^^^^^^^^^^^^^^^
...
LL | enum Foo {}
   | -------- zero-variant enum

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0084, E0539, E0589.
For more information about an error, try `rustc --explain E0084`.