1
+ error: expected unsuffixed literal, found `-`
2
+ --> $DIR/malformed-fn-align.rs:24:9
3
+ |
4
+ LL | #[align(-1)]
5
+ | ^
6
+
7
+ error: suffixed literals are not allowed in attributes
8
+ --> $DIR/malformed-fn-align.rs:30:9
9
+ |
10
+ LL | #[align(4usize)]
11
+ | ^^^^^^
12
+ |
13
+ = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
14
+
1
15
error[E0539]: malformed `align` attribute input
2
16
--> $DIR/malformed-fn-align.rs:5:5
3
17
|
@@ -37,6 +51,18 @@ error[E0589]: invalid alignment value: not a power of two
37
51
LL | #[align(0)]
38
52
| ^
39
53
54
+ error[E0589]: invalid alignment value: not a power of two
55
+ --> $DIR/malformed-fn-align.rs:27:9
56
+ |
57
+ LL | #[align(3)]
58
+ | ^
59
+
60
+ error[E0589]: invalid alignment value: not an unsuffixed integer
61
+ --> $DIR/malformed-fn-align.rs:30:9
62
+ |
63
+ LL | #[align(4usize)]
64
+ | ^^^^^^
65
+
40
66
error: `#[repr(align(...))]` is not supported on function items
41
67
--> $DIR/malformed-fn-align.rs:21:8
42
68
|
@@ -50,7 +76,7 @@ LL | #[repr(align(16))]
50
76
| ^^^^^^^^^
51
77
52
78
error: `#[align(...)]` is not supported on struct items
53
- --> $DIR/malformed-fn-align.rs:24 :1
79
+ --> $DIR/malformed-fn-align.rs:34 :1
54
80
|
55
81
LL | #[align(16)]
56
82
| ^^^^^^^^^^^^
@@ -62,30 +88,30 @@ LL + #[repr(align(16))]
62
88
|
63
89
64
90
error: `#[align(...)]` should be applied to a function item
65
- --> $DIR/malformed-fn-align.rs:27 :1
91
+ --> $DIR/malformed-fn-align.rs:37 :1
66
92
|
67
93
LL | #[align(32)]
68
94
| ^^^^^^^^^^^^
69
95
LL | const FOO: i32 = 42;
70
96
| -------------------- not a function item
71
97
72
98
error: `#[align(...)]` should be applied to a function item
73
- --> $DIR/malformed-fn-align.rs:30 :1
99
+ --> $DIR/malformed-fn-align.rs:40 :1
74
100
|
75
101
LL | #[align(32)]
76
102
| ^^^^^^^^^^^^
77
103
LL | mod test {}
78
104
| ----------- not a function item
79
105
80
106
error: `#[align(...)]` should be applied to a function item
81
- --> $DIR/malformed-fn-align.rs:33 :1
107
+ --> $DIR/malformed-fn-align.rs:43 :1
82
108
|
83
109
LL | #[align(32)]
84
110
| ^^^^^^^^^^^^
85
111
LL | use ::std::iter;
86
112
| ---------------- not a function item
87
113
88
- error: aborting due to 10 previous errors
114
+ error: aborting due to 14 previous errors
89
115
90
116
Some errors have detailed explanations: E0539, E0589, E0805.
91
117
For more information about an error, try `rustc --explain E0539`.
0 commit comments