2019-09-26 10:00:53 +00:00
|
|
|
error: malformed `target_feature` attribute input
|
2023-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:20:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature = "+sse2"]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
|
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2023-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:5:1
|
2023-03-13 18:32:25 +00: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-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:10:1
|
2023-03-13 18:32:25 +00: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-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:15:1
|
2023-03-13 18:32:25 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | extern "Rust" {}
|
|
|
|
| ---------------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:38:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | mod another {}
|
2022-07-11 17:59:04 +00:00
|
|
|
| -------------- not a function definition
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:43:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | const FOO: usize = 7;
|
2022-07-11 17:59:04 +00:00
|
|
|
| --------------------- not a function definition
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:48:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | struct Foo;
|
2022-07-11 17:59:04 +00:00
|
|
|
| ----------- not a function definition
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:53:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
2020-07-11 14:29:35 +00:00
|
|
|
LL | enum Bar {}
|
2022-07-11 17:59:04 +00:00
|
|
|
| ----------- not a function definition
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:58:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
2020-07-11 14:29:35 +00:00
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-09-26 10:00:53 +00:00
|
|
|
LL |
|
2020-07-11 14:29:35 +00:00
|
|
|
LL | / union Qux {
|
|
|
|
LL | |
|
|
|
|
LL | | f1: u16,
|
|
|
|
LL | | f2: u16,
|
|
|
|
LL | | }
|
2022-07-11 17:59:04 +00:00
|
|
|
| |_- not a function definition
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:66:1
|
2023-03-13 18:32:25 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | type Uwu = ();
|
|
|
|
| -------------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:71:1
|
2019-09-26 10:00:53 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
2020-07-11 14:29:35 +00:00
|
|
|
LL | trait Baz {}
|
2022-07-11 17:59:04 +00:00
|
|
|
| ------------ not a function definition
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:81:1
|
2023-03-13 18:32:25 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | static A: () = ();
|
|
|
|
| ------------------ not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:86:1
|
2023-03-13 18:32:25 +00: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
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:93:1
|
2023-03-13 18:32:25 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | impl Foo {}
|
|
|
|
| ----------- not a function definition
|
|
|
|
|
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:112:5
|
2020-06-14 04:47:42 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
LL |
|
|
|
|
LL | / unsafe {
|
|
|
|
LL | | foo();
|
2023-03-02 12:41:17 +00:00
|
|
|
LL | | bar();
|
2020-06-14 04:47:42 +00:00
|
|
|
LL | | }
|
2022-07-11 17:59:04 +00:00
|
|
|
| |_____- not a function definition
|
2020-06-14 04:47:42 +00:00
|
|
|
|
2022-07-11 17:59:04 +00:00
|
|
|
error: attribute should be applied to a function definition
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:120:5
|
2020-04-16 15:11:05 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2020-05-01 13:32:28 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-06-14 04:47:42 +00:00
|
|
|
LL |
|
2020-04-16 15:11:05 +00:00
|
|
|
LL | || {};
|
2022-07-11 17:59:04 +00:00
|
|
|
| ----- not a function definition
|
2020-04-16 15:11:05 +00:00
|
|
|
|
2022-11-06 16:28:07 +00:00
|
|
|
error: the feature named `foo` is not valid for this target
|
2023-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:22:18
|
2022-11-06 16:28:07 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "foo")]
|
|
|
|
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
2023-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:25:18
|
2022-11-06 16:28:07 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(bar)]
|
|
|
|
| ^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
|
|
|
error: malformed `target_feature` attribute input
|
2023-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:27:18
|
2022-11-06 16:28:07 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(disable = "baz")]
|
|
|
|
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
|
|
|
|
|
2023-03-02 12:41:17 +00:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2023-07-29 21:57:53 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:31:1
|
2023-03-02 12:41:17 +00: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
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2023-03-02 12:41:17 +00:00
|
|
|
|
2022-11-06 16:28:07 +00:00
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:76:1
|
2022-11-06 16:28:07 +00:00
|
|
|
|
|
|
|
|
LL | #[inline(always)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
2024-02-23 11:45:44 +00:00
|
|
|
error[E0046]: not all trait items implemented, missing: `foo`
|
|
|
|
--> $DIR/invalid-attribute.rs:88:1
|
|
|
|
|
|
|
|
|
LL | impl Quux for u8 {}
|
|
|
|
| ^^^^^^^^^^^^^^^^ missing `foo` in implementation
|
|
|
|
...
|
|
|
|
LL | fn foo();
|
|
|
|
| --------- `foo` from trait
|
|
|
|
|
2023-03-02 12:41:17 +00:00
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
2024-01-10 06:39:02 +00:00
|
|
|
--> $DIR/invalid-attribute.rs:103:5
|
2020-04-16 15:11:05 +00:00
|
|
|
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
2023-03-02 12:41:17 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-04-16 15:11:05 +00:00
|
|
|
...
|
|
|
|
LL | fn foo() {}
|
2020-08-12 21:02:14 +00:00
|
|
|
| -------- not an `unsafe` function
|
2023-03-02 12:41:17 +00: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
|
2024-01-10 06:39:02 +00:00
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2020-04-16 15:11:05 +00:00
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
error: aborting due to 23 previous errors
|
2019-09-26 10:00:53 +00:00
|
|
|
|
2023-10-31 13:45:26 +00:00
|
|
|
Some errors have detailed explanations: E0046, E0658.
|
|
|
|
For more information about an error, try `rustc --explain E0046`.
|