rust/src/test/ui/target-feature/invalid-attribute.stderr

136 lines
3.9 KiB
Text

error: malformed `target_feature` attribute input
--> $DIR/invalid-attribute.rs:18:1
|
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
--> $DIR/invalid-attribute.rs:20:18
|
LL | #[target_feature(enable = "foo")]
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
error: malformed `target_feature` attribute input
--> $DIR/invalid-attribute.rs:23:18
|
LL | #[target_feature(bar)]
| ^^^ help: must be of the form: `enable = ".."`
error: malformed `target_feature` attribute input
--> $DIR/invalid-attribute.rs:25: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:29: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: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:35:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | mod another {}
| -------------- not a function
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:40:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | const FOO: usize = 7;
| --------------------- not a function
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:45:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | struct Foo;
| ----------- not a function
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:50:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | enum Bar {}
| ----------- not a function
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:55:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / union Qux {
LL | |
LL | | f1: u16,
LL | | f2: u16,
LL | | }
| |_- not a function
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:63:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | trait Baz {}
| ------------ not a function
error: cannot use `#[inline(always)]` with `#[target_feature]`
--> $DIR/invalid-attribute.rs:68:1
|
LL | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:86:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | / unsafe {
LL | | foo();
LL | | bar();
LL | | }
| |_____- not a function
error: attribute should be applied to a function
--> $DIR/invalid-attribute.rs:94:5
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | || {};
| ----- not a function
error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
--> $DIR/invalid-attribute.rs:78: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
error: aborting due to 15 previous errors
For more information about this error, try `rustc --explain E0658`.