2019-09-26 05:00:53 -05:00
|
|
|
error: malformed `target_feature` attribute input
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:18:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature = "+sse2"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
|
|
|
|
|
|
|
|
error: the feature named `foo` is not valid for this target
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:20:18
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:23:18
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(bar)]
|
|
|
|
| ^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:25:18
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(disable = "baz")]
|
|
|
|
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
2020-05-01 08:32:28 -05:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:29:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2020-05-01 08:32:28 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-09-26 05:00:53 -05:00
|
|
|
...
|
|
|
|
LL | fn bar() {}
|
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
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:35:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | mod another {}
|
|
|
|
| -------------- not a function
|
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:40:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | const FOO: usize = 7;
|
|
|
|
| --------------------- not a function
|
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:45:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | struct Foo;
|
|
|
|
| ----------- not a function
|
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:50: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 {}
|
|
|
|
| ----------- not a function
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:55: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 | | }
|
|
|
|
| |_- not a function
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:63: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 {}
|
|
|
|
| ------------ not a function
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:68:1
|
2019-09-26 05:00:53 -05:00
|
|
|
|
|
|
|
|
LL | #[inline(always)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-06-13 23:47:42 -05:00
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:86:5
|
2020-06-13 23:47:42 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | foo();
|
|
|
|
LL | | bar();
|
|
|
|
LL | | }
|
|
|
|
| |_____- not a function
|
|
|
|
|
|
|
|
error: attribute should be applied to a function
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:94: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 | || {};
|
2020-06-13 23:47:42 -05:00
|
|
|
| ----- not a function
|
2020-04-16 10:11:05 -05:00
|
|
|
|
2020-05-01 08:32:28 -05:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2020-07-11 09:29:35 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:78: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`.
|