@@ -121,53 +121,45 @@ LL | #[target_feature(enable = "sse2")]
121121 = help: the `target_feature` attribute can only be applied to functions
122122
123123error: the `target_feature` attribute cannot be used on statics
124- --> $DIR/invalid-attribute.rs:75 :3
124+ --> $DIR/invalid-attribute.rs:69 :3
125125 |
126126LL | #[target_feature(enable = "sse2")]
127127 | ^^^^^^^^^^^^^^
128128 |
129129 = help: the `target_feature` attribute can only be applied to functions
130130
131131error: the `target_feature` attribute cannot be used on trait impl blocks
132- --> $DIR/invalid-attribute.rs:79 :3
132+ --> $DIR/invalid-attribute.rs:73 :3
133133 |
134134LL | #[target_feature(enable = "sse2")]
135135 | ^^^^^^^^^^^^^^
136136 |
137137 = help: the `target_feature` attribute can only be applied to functions
138138
139139error: the `target_feature` attribute cannot be used on inherent impl blocks
140- --> $DIR/invalid-attribute.rs:85 :3
140+ --> $DIR/invalid-attribute.rs:79 :3
141141 |
142142LL | #[target_feature(enable = "sse2")]
143143 | ^^^^^^^^^^^^^^
144144 |
145145 = help: the `target_feature` attribute can only be applied to functions
146146
147147error: the `target_feature` attribute cannot be used on expressions
148- --> $DIR/invalid-attribute.rs:106 :7
148+ --> $DIR/invalid-attribute.rs:100 :7
149149 |
150150LL | #[target_feature(enable = "sse2")]
151151 | ^^^^^^^^^^^^^^
152152 |
153153 = help: the `target_feature` attribute can only be applied to functions
154154
155155error: the `target_feature` attribute cannot be used on closures
156- --> $DIR/invalid-attribute.rs:112 :7
156+ --> $DIR/invalid-attribute.rs:106 :7
157157 |
158158LL | #[target_feature(enable = "sse2")]
159159 | ^^^^^^^^^^^^^^
160160 |
161161 = help: the `target_feature` attribute can be applied to functions and methods
162162
163- error: cannot use `#[inline(always)]` with `#[target_feature]`
164- --> $DIR/invalid-attribute.rs:69:1
165- |
166- LL | #[inline(always)]
167- | ^^^^^^^^^^^^^^^^^
168- |
169- = note: See this issue for full discussion: https://github.com/rust-lang/rust/issues/145574
170-
171163error: the feature named `foo` is not valid for this target
172164 --> $DIR/invalid-attribute.rs:27:18
173165 |
@@ -177,7 +169,7 @@ LL | #[target_feature(enable = "foo")]
177169 = help: valid names are: `fma`, `xop`, `adx`, `aes`, and `avx` and X more
178170
179171error[E0046]: not all trait items implemented, missing: `foo`
180- --> $DIR/invalid-attribute.rs:81 :1
172+ --> $DIR/invalid-attribute.rs:75 :1
181173 |
182174LL | impl Quux for u8 {}
183175 | ^^^^^^^^^^^^^^^^ missing `foo` in implementation
@@ -186,7 +178,7 @@ LL | fn foo();
186178 | --------- `foo` from trait
187179
188180error: `#[target_feature(..)]` cannot be applied to safe trait method
189- --> $DIR/invalid-attribute.rs:95 :5
181+ --> $DIR/invalid-attribute.rs:89 :5
190182 |
191183LL | #[target_feature(enable = "sse2")]
192184 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be applied to safe trait method
@@ -195,21 +187,21 @@ LL | fn foo() {}
195187 | -------- not an `unsafe` function
196188
197189error[E0053]: method `foo` has an incompatible type for trait
198- --> $DIR/invalid-attribute.rs:98 :5
190+ --> $DIR/invalid-attribute.rs:92 :5
199191 |
200192LL | fn foo() {}
201193 | ^^^^^^^^ expected safe fn, found unsafe fn
202194 |
203195note: type in trait
204- --> $DIR/invalid-attribute.rs:90 :5
196+ --> $DIR/invalid-attribute.rs:84 :5
205197 |
206198LL | fn foo();
207199 | ^^^^^^^^^
208200 = note: expected signature `fn()`
209201 found signature `#[target_feature(..)] fn()`
210202
211203error: the feature named `+sse2` is not valid for this target
212- --> $DIR/invalid-attribute.rs:117 :18
204+ --> $DIR/invalid-attribute.rs:111 :18
213205 |
214206LL | #[target_feature(enable = "+sse2")]
215207 | ^^^^^^^^^^^^^^^^ `+sse2` is not valid for this target
@@ -221,22 +213,22 @@ LL + #[target_feature(enable = "sse2")]
221213 |
222214
223215error: the feature named `sse5` is not valid for this target
224- --> $DIR/invalid-attribute.rs:122 :18
216+ --> $DIR/invalid-attribute.rs:116 :18
225217 |
226218LL | #[target_feature(enable = "sse5")]
227219 | ^^^^^^^^^^^^^^^ `sse5` is not valid for this target
228220 |
229221 = help: valid names are: `sse`, `sse2`, `sse3`, `sse4a`, and `ssse3` and X more
230222
231223error: the feature named `avx512` is not valid for this target
232- --> $DIR/invalid-attribute.rs:127 :18
224+ --> $DIR/invalid-attribute.rs:121 :18
233225 |
234226LL | #[target_feature(enable = "avx512")]
235227 | ^^^^^^^^^^^^^^^^^ `avx512` is not valid for this target
236228 |
237229 = help: valid names are: `avx512f`, `avx2`, `avx512bw`, `avx512cd`, and `avx512dq` and X more
238230
239- error: aborting due to 26 previous errors
231+ error: aborting due to 25 previous errors
240232
241233Some errors have detailed explanations: E0046, E0053, E0539.
242234For more information about an error, try `rustc --explain E0046`.
0 commit comments