2019-09-26 05:00:53 -05:00
|
|
|
error: malformed `target_feature` attribute input
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:32: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:17:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | extern crate alloc;
|
|
|
|
| ------------------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:22:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | use alloc::alloc::alloc;
|
|
|
|
| ------------------------ not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:27:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | extern "Rust" {}
|
|
|
|
| ---------------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:49: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:54: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:59: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:64: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:69: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:77:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | type Uwu = ();
|
|
|
|
| -------------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:82: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:92:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | static A: () = ();
|
|
|
|
| ------------------ not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:97:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | impl Quux for u8 {}
|
|
|
|
| ------------------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:102:1
|
2023-03-13 13:32:25 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | impl Foo {}
|
|
|
|
| ----------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:120:5
|
2020-06-13 23:47:42 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | foo();
|
2023-03-02 06:41:17 -06:00
|
|
|
LL | | bar();
|
2020-06-13 23:47:42 -05:00
|
|
|
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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:128: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
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:34:18
|
2022-11-06 10:28:07 -06:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:37:18
|
2022-11-06 10:28:07 -06:00
|
|
|
|
|
|
|
|
LL | #[target_feature(bar)]
|
|
|
|
| ^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:39:18
|
2022-11-06 10:28:07 -06:00
|
|
|
|
|
|
|
|
LL | #[target_feature(disable = "baz")]
|
|
|
|
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
2023-03-02 06:41:17 -06:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:43:1
|
2023-03-02 06:41:17 -06:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2022-11-06 10:28:07 -06:00
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:87:1
|
2022-11-06 10:28:07 -06:00
|
|
|
|
|
|
|
|
LL | #[inline(always)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2023-03-02 06:41:17 -06:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2023-04-14 04:42:08 -05:00
|
|
|
--> $DIR/invalid-attribute.rs:112:5
|
2020-04-16 10:11:05 -05:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2023-03-02 06:41:17 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-04-16 10:11:05 -05:00
|
|
|
...
|
|
|
|
LL | fn foo() {}
|
2020-08-12 16:02:14 -05:00
|
|
|
| -------- not an `unsafe` function
|
2023-03-02 06:41:17 -06: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
|
|
|
|
2023-03-13 13:32:25 -05:00
|
|
|
error: aborting due to 22 previous errors
|
2019-09-26 05:00:53 -05:00
|
|
|
|
2023-03-02 06:41:17 -06:00
|
|
|
For more information about this error, try `rustc --explain E0658`.
|