212 lines
6.3 KiB
Plaintext
212 lines
6.3 KiB
Plaintext
error: malformed `target_feature` attribute input
|
|
--> $DIR/invalid-attribute.rs:20:1
|
|
|
|
|
LL | #[target_feature = "+sse2"]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:5:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | extern crate alloc;
|
|
| ------------------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:10:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | use alloc::alloc::alloc;
|
|
| ------------------------ not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:15:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | extern "Rust" {}
|
|
| ---------------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:38:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | mod another {}
|
|
| -------------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:43:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | const FOO: usize = 7;
|
|
| --------------------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:48:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | struct Foo;
|
|
| ----------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:53:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | enum Bar {}
|
|
| ----------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:58:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | / union Qux {
|
|
LL | |
|
|
LL | | f1: u16,
|
|
LL | | f2: u16,
|
|
LL | | }
|
|
| |_- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:66:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | type Uwu = ();
|
|
| -------------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:71:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | trait Baz {}
|
|
| ------------ not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:81:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | static A: () = ();
|
|
| ------------------ not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:86:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | impl Quux for u8 {}
|
|
| ------------------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:93:1
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | impl Foo {}
|
|
| ----------- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:112:5
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | / unsafe {
|
|
LL | | foo();
|
|
LL | | bar();
|
|
LL | | }
|
|
| |_____- not a function definition
|
|
|
|
error: attribute should be applied to a function definition
|
|
--> $DIR/invalid-attribute.rs:120:5
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | || {};
|
|
| ----- not a function definition
|
|
|
|
error: the feature named `foo` is not valid for this target
|
|
--> $DIR/invalid-attribute.rs:22:18
|
|
|
|
|
LL | #[target_feature(enable = "foo")]
|
|
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
|
|
|
|
error: malformed `target_feature` attribute input
|
|
--> $DIR/invalid-attribute.rs:25:18
|
|
|
|
|
LL | #[target_feature(bar)]
|
|
| ^^^ help: must be of the form: `enable = ".."`
|
|
|
|
error: malformed `target_feature` attribute input
|
|
--> $DIR/invalid-attribute.rs:27: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:31: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
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
|
--> $DIR/invalid-attribute.rs:76:1
|
|
|
|
|
LL | #[inline(always)]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
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
|
|
|
|
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
|
|
--> $DIR/invalid-attribute.rs:103:5
|
|
|
|
|
LL | #[target_feature(enable = "sse2")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
...
|
|
LL | fn foo() {}
|
|
| -------- 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
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
|
|
|
error: aborting due to 23 previous errors
|
|
|
|
Some errors have detailed explanations: E0046, E0658.
|
|
For more information about an error, try `rustc --explain E0046`.
|