2019-09-26 11:00:53 +01:00
|
|
|
error: malformed `target_feature` attribute input
|
2022-01-19 16:24:49 +01:00
|
|
|
--> $DIR/invalid-attribute.rs:17:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
|
|
|
LL | #[target_feature = "+sse2"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
|
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:28:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | mod another {}
|
2022-07-11 18:59:04 +01:00
|
|
|
| -------------- not a function definition
|
2019-09-26 11:00:53 +01:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:33:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | const FOO: usize = 7;
|
2022-07-11 18:59:04 +01:00
|
|
|
| --------------------- not a function definition
|
2019-09-26 11:00:53 +01:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:38:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | struct Foo;
|
2022-07-11 18:59:04 +01:00
|
|
|
| ----------- not a function definition
|
2019-09-26 11:00:53 +01:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:43:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
2020-07-11 10:29:35 -04:00
|
|
|
LL | enum Bar {}
|
2022-07-11 18:59:04 +01:00
|
|
|
| ----------- not a function definition
|
2019-09-26 11:00:53 +01:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:48:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
2020-07-11 10:29:35 -04:00
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-09-26 11:00:53 +01:00
|
|
|
LL |
|
2020-07-11 10:29:35 -04:00
|
|
|
LL | / union Qux {
|
|
|
|
LL | |
|
|
|
|
LL | | f1: u16,
|
|
|
|
LL | | f2: u16,
|
|
|
|
LL | | }
|
2022-07-11 18:59:04 +01:00
|
|
|
| |_- not a function definition
|
2019-09-26 11:00:53 +01:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:56:1
|
2019-09-26 11:00:53 +01:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
2020-07-11 10:29:35 -04:00
|
|
|
LL | trait Baz {}
|
2022-07-11 18:59:04 +01:00
|
|
|
| ------------ not a function definition
|
2019-09-26 11:00:53 +01:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:79:5
|
2020-06-14 00:47:42 -04:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | foo();
|
|
|
|
LL | | }
|
2022-07-11 18:59:04 +01:00
|
|
|
| |_____- not a function definition
|
2020-06-14 00:47:42 -04:00
|
|
|
|
2022-07-11 18:59:04 +01:00
|
|
|
error: attribute should be applied to a function definition
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:86:5
|
2020-04-16 17:11:05 +02:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2020-05-01 15:32:28 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-06-14 00:47:42 -04:00
|
|
|
LL |
|
2020-04-16 17:11:05 +02:00
|
|
|
LL | || {};
|
2022-07-11 18:59:04 +01:00
|
|
|
| ----- not a function definition
|
2020-04-16 17:11:05 +02:00
|
|
|
|
2022-11-06 16:28:07 +00:00
|
|
|
error: the feature named `foo` is not valid for this target
|
|
|
|
--> $DIR/invalid-attribute.rs:19:18
|
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
|
|
|
--> $DIR/invalid-attribute.rs:22:18
|
|
|
|
|
|
|
|
|
LL | #[target_feature(bar)]
|
|
|
|
| ^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
|
|
|
--> $DIR/invalid-attribute.rs:24:18
|
|
|
|
|
|
|
|
|
LL | #[target_feature(disable = "baz")]
|
|
|
|
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
2022-07-23 14:32:52 +02:00
|
|
|
--> $DIR/invalid-attribute.rs:61:1
|
2022-11-06 16:28:07 +00:00
|
|
|
|
|
|
|
|
LL | #[inline(always)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-07-23 14:32:52 +02:00
|
|
|
error: `#[target_feature(..)]` cannot be applied to safe trait method
|
|
|
|
--> $DIR/invalid-attribute.rs:71:5
|
2020-04-16 17:11:05 +02:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2022-07-23 14:32:52 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be applied to safe trait method
|
2020-04-16 17:11:05 +02:00
|
|
|
...
|
|
|
|
LL | fn foo() {}
|
2020-08-12 17:02:14 -04:00
|
|
|
| -------- not an `unsafe` function
|
2020-04-16 17:11:05 +02:00
|
|
|
|
2022-07-23 14:32:52 +02:00
|
|
|
error: aborting due to 14 previous errors
|
2019-09-26 11:00:53 +01:00
|
|
|
|