1
1
error: malformed `target_feature` attribute input
2
- --> $DIR/invalid-attribute.rs:17 :1
2
+ --> $DIR/invalid-attribute.rs:32 :1
3
3
|
4
4
LL | #[target_feature = "+sse2"]
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
6
6
7
7
error: attribute should be applied to a function definition
8
- --> $DIR/invalid-attribute.rs:34:1
8
+ --> $DIR/invalid-attribute.rs:17:1
9
+ |
10
+ LL | #[target_feature(enable = "sse2")]
11
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
+ LL |
13
+ LL | extern crate alloc;
14
+ | ------------------- not a function definition
15
+
16
+ error: attribute should be applied to a function definition
17
+ --> $DIR/invalid-attribute.rs:22:1
18
+ |
19
+ LL | #[target_feature(enable = "sse2")]
20
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
+ LL |
22
+ LL | use alloc::alloc::alloc;
23
+ | ------------------------ not a function definition
24
+
25
+ error: attribute should be applied to a function definition
26
+ --> $DIR/invalid-attribute.rs:27:1
27
+ |
28
+ LL | #[target_feature(enable = "sse2")]
29
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30
+ LL |
31
+ LL | extern "Rust" {}
32
+ | ---------------- not a function definition
33
+
34
+ error: attribute should be applied to a function definition
35
+ --> $DIR/invalid-attribute.rs:49:1
9
36
|
10
37
LL | #[target_feature(enable = "sse2")]
11
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,7 +41,7 @@ LL | mod another {}
14
41
| -------------- not a function definition
15
42
16
43
error: attribute should be applied to a function definition
17
- --> $DIR/invalid-attribute.rs:39 :1
44
+ --> $DIR/invalid-attribute.rs:54 :1
18
45
|
19
46
LL | #[target_feature(enable = "sse2")]
20
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +50,7 @@ LL | const FOO: usize = 7;
23
50
| --------------------- not a function definition
24
51
25
52
error: attribute should be applied to a function definition
26
- --> $DIR/invalid-attribute.rs:44 :1
53
+ --> $DIR/invalid-attribute.rs:59 :1
27
54
|
28
55
LL | #[target_feature(enable = "sse2")]
29
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -32,7 +59,7 @@ LL | struct Foo;
32
59
| ----------- not a function definition
33
60
34
61
error: attribute should be applied to a function definition
35
- --> $DIR/invalid-attribute.rs:49 :1
62
+ --> $DIR/invalid-attribute.rs:64 :1
36
63
|
37
64
LL | #[target_feature(enable = "sse2")]
38
65
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +68,7 @@ LL | enum Bar {}
41
68
| ----------- not a function definition
42
69
43
70
error: attribute should be applied to a function definition
44
- --> $DIR/invalid-attribute.rs:54 :1
71
+ --> $DIR/invalid-attribute.rs:69 :1
45
72
|
46
73
LL | #[target_feature(enable = "sse2")]
47
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -54,7 +81,16 @@ LL | | }
54
81
| |_- not a function definition
55
82
56
83
error: attribute should be applied to a function definition
57
- --> $DIR/invalid-attribute.rs:62:1
84
+ --> $DIR/invalid-attribute.rs:77:1
85
+ |
86
+ LL | #[target_feature(enable = "sse2")]
87
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
+ LL |
89
+ LL | type Uwu = ();
90
+ | -------------- not a function definition
91
+
92
+ error: attribute should be applied to a function definition
93
+ --> $DIR/invalid-attribute.rs:82:1
58
94
|
59
95
LL | #[target_feature(enable = "sse2")]
60
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -63,7 +99,34 @@ LL | trait Baz {}
63
99
| ------------ not a function definition
64
100
65
101
error: attribute should be applied to a function definition
66
- --> $DIR/invalid-attribute.rs:85:5
102
+ --> $DIR/invalid-attribute.rs:92:1
103
+ |
104
+ LL | #[target_feature(enable = "sse2")]
105
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
+ LL |
107
+ LL | static A: () = ();
108
+ | ------------------ not a function definition
109
+
110
+ error: attribute should be applied to a function definition
111
+ --> $DIR/invalid-attribute.rs:97:1
112
+ |
113
+ LL | #[target_feature(enable = "sse2")]
114
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115
+ LL |
116
+ LL | impl Quux for u8 {}
117
+ | ------------------- not a function definition
118
+
119
+ error: attribute should be applied to a function definition
120
+ --> $DIR/invalid-attribute.rs:102:1
121
+ |
122
+ LL | #[target_feature(enable = "sse2")]
123
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
+ LL |
125
+ LL | impl Foo {}
126
+ | ----------- not a function definition
127
+
128
+ error: attribute should be applied to a function definition
129
+ --> $DIR/invalid-attribute.rs:120:5
67
130
|
68
131
LL | #[target_feature(enable = "sse2")]
69
132
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -75,7 +138,7 @@ LL | | }
75
138
| |_____- not a function definition
76
139
77
140
error: attribute should be applied to a function definition
78
- --> $DIR/invalid-attribute.rs:93 :5
141
+ --> $DIR/invalid-attribute.rs:128 :5
79
142
|
80
143
LL | #[target_feature(enable = "sse2")]
81
144
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -84,25 +147,25 @@ LL | || {};
84
147
| ----- not a function definition
85
148
86
149
error: the feature named `foo` is not valid for this target
87
- --> $DIR/invalid-attribute.rs:19 :18
150
+ --> $DIR/invalid-attribute.rs:34 :18
88
151
|
89
152
LL | #[target_feature(enable = "foo")]
90
153
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
91
154
92
155
error: malformed `target_feature` attribute input
93
- --> $DIR/invalid-attribute.rs:22 :18
156
+ --> $DIR/invalid-attribute.rs:37 :18
94
157
|
95
158
LL | #[target_feature(bar)]
96
159
| ^^^ help: must be of the form: `enable = ".."`
97
160
98
161
error: malformed `target_feature` attribute input
99
- --> $DIR/invalid-attribute.rs:24 :18
162
+ --> $DIR/invalid-attribute.rs:39 :18
100
163
|
101
164
LL | #[target_feature(disable = "baz")]
102
165
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
103
166
104
167
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
105
- --> $DIR/invalid-attribute.rs:28 :1
168
+ --> $DIR/invalid-attribute.rs:43 :1
106
169
|
107
170
LL | #[target_feature(enable = "sse2")]
108
171
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -114,13 +177,13 @@ LL | fn bar() {}
114
177
= help: add `#![feature(target_feature_11)]` to the crate attributes to enable
115
178
116
179
error: cannot use `#[inline(always)]` with `#[target_feature]`
117
- --> $DIR/invalid-attribute.rs:67 :1
180
+ --> $DIR/invalid-attribute.rs:87 :1
118
181
|
119
182
LL | #[inline(always)]
120
183
| ^^^^^^^^^^^^^^^^^
121
184
122
185
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
123
- --> $DIR/invalid-attribute.rs:77 :5
186
+ --> $DIR/invalid-attribute.rs:112 :5
124
187
|
125
188
LL | #[target_feature(enable = "sse2")]
126
189
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -131,6 +194,6 @@ LL | fn foo() {}
131
194
= note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
132
195
= help: add `#![feature(target_feature_11)]` to the crate attributes to enable
133
196
134
- error: aborting due to 15 previous errors
197
+ error: aborting due to 22 previous errors
135
198
136
199
For more information about this error, try `rustc --explain E0658`.
0 commit comments