blob: 7b75367b48c2499649cae7f09c295be263995ea2 (
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
error: `#[target_feature]` attribute cannot be used on extern crates
--> $DIR/invalid-attribute.rs:5:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on use statements
--> $DIR/invalid-attribute.rs:9:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on foreign modules
--> $DIR/invalid-attribute.rs:13:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error[E0539]: malformed `target_feature` attribute input
--> $DIR/invalid-attribute.rs:17:1
|
LL | #[target_feature = "+sse2"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected this to be a list
| help: must be of the form: `#[target_feature(enable = "feat1, feat2")]`
error[E0539]: malformed `target_feature` attribute input
--> $DIR/invalid-attribute.rs:23:1
|
LL | #[target_feature(bar)]
| ^^^^^^^^^^^^^^^^^---^^
| | |
| | expected this to be of the form `enable = "..."`
| help: must be of the form: `#[target_feature(enable = "feat1, feat2")]`
error[E0539]: malformed `target_feature` attribute input
--> $DIR/invalid-attribute.rs:26:1
|
LL | #[target_feature(disable = "baz")]
| ^^^^^^^^^^^^^^^^^-------^^^^^^^^^^
| | |
| | expected this to be of the form `enable = "..."`
| help: must be of the form: `#[target_feature(enable = "feat1, feat2")]`
error: `#[target_feature]` attribute cannot be used on modules
--> $DIR/invalid-attribute.rs:31:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on constants
--> $DIR/invalid-attribute.rs:35:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on structs
--> $DIR/invalid-attribute.rs:39:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on enums
--> $DIR/invalid-attribute.rs:43:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on unions
--> $DIR/invalid-attribute.rs:47:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on type aliases
--> $DIR/invalid-attribute.rs:54:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on traits
--> $DIR/invalid-attribute.rs:58:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on statics
--> $DIR/invalid-attribute.rs:67:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on trait impl blocks
--> $DIR/invalid-attribute.rs:71:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on inherent impl blocks
--> $DIR/invalid-attribute.rs:77:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on expressions
--> $DIR/invalid-attribute.rs:98:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can only be applied to functions
error: `#[target_feature]` attribute cannot be used on closures
--> $DIR/invalid-attribute.rs:104:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: `#[target_feature]` can be applied to methods and functions
error: cannot use `#[inline(always)]` with `#[target_feature]`
--> $DIR/invalid-attribute.rs:62:1
|
LL | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error: the feature named `foo` is not valid for this target
--> $DIR/invalid-attribute.rs:20:18
|
LL | #[target_feature(enable = "foo")]
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
error[E0046]: not all trait items implemented, missing: `foo`
--> $DIR/invalid-attribute.rs:73:1
|
LL | impl Quux for u8 {}
| ^^^^^^^^^^^^^^^^ missing `foo` in implementation
...
LL | fn foo();
| --------- `foo` from trait
error: `#[target_feature(..)]` cannot be applied to safe trait method
--> $DIR/invalid-attribute.rs:87:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be applied to safe trait method
...
LL | fn foo() {}
| -------- not an `unsafe` function
error[E0053]: method `foo` has an incompatible type for trait
--> $DIR/invalid-attribute.rs:90:5
|
LL | fn foo() {}
| ^^^^^^^^ expected safe fn, found unsafe fn
|
note: type in trait
--> $DIR/invalid-attribute.rs:82:5
|
LL | fn foo();
| ^^^^^^^^^
= note: expected signature `fn()`
found signature `#[target_features] fn()`
error: the feature named `+sse2` is not valid for this target
--> $DIR/invalid-attribute.rs:109:18
|
LL | #[target_feature(enable = "+sse2")]
| ^^^^^^^^^^^^^^^^ `+sse2` is not valid for this target
|
= help: consider removing the leading `+` in the feature name
error: aborting due to 24 previous errors
Some errors have detailed explanations: E0046, E0053, E0539.
For more information about an error, try `rustc --explain E0046`.
|