2019-09-26 05:00:53 -05:00
|
|
|
error: malformed `target_feature` attribute input
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:17:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature = "+sse2"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
|
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:34:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | mod another {}
|
2022-07-11 12:59:04 -05:00
|
|
|
| -------------- not a function definition
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:39:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | const FOO: usize = 7;
|
2022-07-11 12:59:04 -05:00
|
|
|
| --------------------- not a function definition
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:44:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | struct Foo;
|
2022-07-11 12:59:04 -05:00
|
|
|
| ----------- not a function definition
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:49:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
2020-07-11 09:29:35 -05:00
|
|
|
LL | enum Bar {}
|
2022-07-11 12:59:04 -05:00
|
|
|
| ----------- not a function definition
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:54:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
2020-07-11 09:29:35 -05:00
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-09-26 05:00:53 -05:00
|
|
|
LL |
|
2020-07-11 09:29:35 -05:00
|
|
|
LL | / union Qux {
|
|
|
|
LL | |
|
|
|
|
LL | | f1: u16,
|
|
|
|
LL | | f2: u16,
|
|
|
|
LL | | }
|
2022-07-11 12:59:04 -05:00
|
|
|
| |_- not a function definition
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:62:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
2020-07-11 09:29:35 -05:00
|
|
|
LL | trait Baz {}
|
2022-07-11 12:59:04 -05:00
|
|
|
| ------------ not a function definition
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:85:5
|
2020-06-13 23:47:42 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | foo();
|
|
|
|
LL | | bar();
|
|
|
|
LL | | }
|
2022-07-11 12:59:04 -05:00
|
|
|
| |_____- not a function definition
|
2020-06-13 23:47:42 -05:00
|
|
|
|
2022-07-11 12:59:04 -05:00
|
|
|
error: attribute should be applied to a function definition
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:93:5
|
2020-04-16 10:11:05 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2020-05-01 08:32:28 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-06-13 23:47:42 -05:00
|
|
|
LL |
|
2020-04-16 10:11:05 -05:00
|
|
|
LL | || {};
|
2022-07-11 12:59:04 -05:00
|
|
|
| ----- not a function definition
|
2020-04-16 10:11:05 -05:00
|
|
|
|
2022-11-06 10:28:07 -06: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[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
|
|
|
--> $DIR/invalid-attribute.rs:28:1
|
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
|
|
|
LL | fn bar() {}
|
|
|
|
| -------- not an `unsafe` function
|
|
|
|
|
|
|
|
|
= note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
|
|
|
|
= help: add `#![feature(target_feature_11)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
|
|
|
--> $DIR/invalid-attribute.rs:67:1
|
|
|
|
|
|
|
|
|
LL | #[inline(always)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-05-01 08:32:28 -05:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2022-01-19 09:24:49 -06:00
|
|
|
--> $DIR/invalid-attribute.rs:77:5
|
2020-04-16 10:11:05 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2020-05-01 08:32:28 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-04-16 10:11:05 -05:00
|
|
|
...
|
|
|
|
LL | fn foo() {}
|
2020-08-12 16:02:14 -05:00
|
|
|
| -------- not an `unsafe` function
|
2020-05-01 08:32:28 -05:00
|
|
|
|
|
|
|
|
= note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
|
|
|
|
= help: add `#![feature(target_feature_11)]` to the crate attributes to enable
|
2020-04-16 10:11:05 -05:00
|
|
|
|
2020-06-13 23:47:42 -05:00
|
|
|
error: aborting due to 15 previous errors
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2020-05-01 08:32:28 -05:00
|
|
|
For more information about this error, try `rustc --explain E0658`.
|