@@ -32,7 +32,7 @@ LL | extern "Rust" {}
32
32
| ---------------- not a function definition
33
33
34
34
error: attribute should be applied to a function definition
35
- --> $DIR/invalid-attribute.rs:38 :1
35
+ --> $DIR/invalid-attribute.rs:31 :1
36
36
|
37
37
LL | #[target_feature(enable = "sse2")]
38
38
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | mod another {}
41
41
| -------------- not a function definition
42
42
43
43
error: attribute should be applied to a function definition
44
- --> $DIR/invalid-attribute.rs:43 :1
44
+ --> $DIR/invalid-attribute.rs:36 :1
45
45
|
46
46
LL | #[target_feature(enable = "sse2")]
47
47
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -50,7 +50,7 @@ LL | const FOO: usize = 7;
50
50
| --------------------- not a function definition
51
51
52
52
error: attribute should be applied to a function definition
53
- --> $DIR/invalid-attribute.rs:48 :1
53
+ --> $DIR/invalid-attribute.rs:41 :1
54
54
|
55
55
LL | #[target_feature(enable = "sse2")]
56
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL | struct Foo;
59
59
| ----------- not a function definition
60
60
61
61
error: attribute should be applied to a function definition
62
- --> $DIR/invalid-attribute.rs:53 :1
62
+ --> $DIR/invalid-attribute.rs:46 :1
63
63
|
64
64
LL | #[target_feature(enable = "sse2")]
65
65
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | enum Bar {}
68
68
| ----------- not a function definition
69
69
70
70
error: attribute should be applied to a function definition
71
- --> $DIR/invalid-attribute.rs:58 :1
71
+ --> $DIR/invalid-attribute.rs:51 :1
72
72
|
73
73
LL | #[target_feature(enable = "sse2")]
74
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -81,7 +81,7 @@ LL | | }
81
81
| |_- not a function definition
82
82
83
83
error: attribute should be applied to a function definition
84
- --> $DIR/invalid-attribute.rs:66 :1
84
+ --> $DIR/invalid-attribute.rs:59 :1
85
85
|
86
86
LL | #[target_feature(enable = "sse2")]
87
87
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +90,7 @@ LL | type Uwu = ();
90
90
| -------------- not a function definition
91
91
92
92
error: attribute should be applied to a function definition
93
- --> $DIR/invalid-attribute.rs:71 :1
93
+ --> $DIR/invalid-attribute.rs:64 :1
94
94
|
95
95
LL | #[target_feature(enable = "sse2")]
96
96
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -99,7 +99,7 @@ LL | trait Baz {}
99
99
| ------------ not a function definition
100
100
101
101
error: attribute should be applied to a function definition
102
- --> $DIR/invalid-attribute.rs:81 :1
102
+ --> $DIR/invalid-attribute.rs:74 :1
103
103
|
104
104
LL | #[target_feature(enable = "sse2")]
105
105
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -108,7 +108,7 @@ LL | static A: () = ();
108
108
| ------------------ not a function definition
109
109
110
110
error: attribute should be applied to a function definition
111
- --> $DIR/invalid-attribute.rs:86 :1
111
+ --> $DIR/invalid-attribute.rs:79 :1
112
112
|
113
113
LL | #[target_feature(enable = "sse2")]
114
114
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -117,7 +117,7 @@ LL | impl Quux for u8 {}
117
117
| ------------------- not a function definition
118
118
119
119
error: attribute should be applied to a function definition
120
- --> $DIR/invalid-attribute.rs:93 :1
120
+ --> $DIR/invalid-attribute.rs:86 :1
121
121
|
122
122
LL | #[target_feature(enable = "sse2")]
123
123
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -126,19 +126,18 @@ LL | impl Foo {}
126
126
| ----------- not a function definition
127
127
128
128
error: attribute should be applied to a function definition
129
- --> $DIR/invalid-attribute.rs:112 :5
129
+ --> $DIR/invalid-attribute.rs:104 :5
130
130
|
131
131
LL | #[target_feature(enable = "sse2")]
132
132
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133
133
LL |
134
134
LL | / unsafe {
135
135
LL | | foo();
136
- LL | | bar();
137
136
LL | | }
138
137
| |_____- not a function definition
139
138
140
139
error: attribute should be applied to a function definition
141
- --> $DIR/invalid-attribute.rs:120 :5
140
+ --> $DIR/invalid-attribute.rs:111 :5
142
141
|
143
142
LL | #[target_feature(enable = "sse2")]
144
143
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -164,48 +163,30 @@ error: malformed `target_feature` attribute input
164
163
LL | #[target_feature(disable = "baz")]
165
164
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
166
165
167
- error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
168
- --> $DIR/invalid-attribute.rs:31:1
169
- |
170
- LL | #[target_feature(enable = "sse2")]
171
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
172
- ...
173
- LL | fn bar() {}
174
- | -------- not an `unsafe` function
175
- |
176
- = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
177
- = help: add `#![feature(target_feature_11)]` to the crate attributes to enable
178
- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
179
-
180
166
error: cannot use `#[inline(always)]` with `#[target_feature]`
181
- --> $DIR/invalid-attribute.rs:76 :1
167
+ --> $DIR/invalid-attribute.rs:69 :1
182
168
|
183
169
LL | #[inline(always)]
184
170
| ^^^^^^^^^^^^^^^^^
185
171
186
172
error[E0046]: not all trait items implemented, missing: `foo`
187
- --> $DIR/invalid-attribute.rs:88 :1
173
+ --> $DIR/invalid-attribute.rs:81 :1
188
174
|
189
175
LL | impl Quux for u8 {}
190
176
| ^^^^^^^^^^^^^^^^ missing `foo` in implementation
191
177
...
192
178
LL | fn foo();
193
179
| --------- `foo` from trait
194
180
195
- error[E0658] : `#[target_feature(..)]` can only be applied to `unsafe` functions
196
- --> $DIR/invalid-attribute.rs:103 :5
181
+ error: `#[target_feature(..)]` cannot be applied to safe trait method
182
+ --> $DIR/invalid-attribute.rs:96 :5
197
183
|
198
184
LL | #[target_feature(enable = "sse2")]
199
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
185
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be applied to safe trait method
200
186
...
201
187
LL | fn foo() {}
202
188
| -------- not an `unsafe` function
203
- |
204
- = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
205
- = help: add `#![feature(target_feature_11)]` to the crate attributes to enable
206
- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
207
189
208
- error: aborting due to 23 previous errors
190
+ error: aborting due to 22 previous errors
209
191
210
- Some errors have detailed explanations: E0046, E0658.
211
- For more information about an error, try `rustc --explain E0046`.
192
+ For more information about this error, try `rustc --explain E0046`.
0 commit comments