rust/src/test/ui/target-feature-wrong.stderr

51 lines
1.5 KiB
Plaintext
Raw Normal View History

error: malformed `target_feature` attribute input
2018-12-25 09:56:47 -06:00
--> $DIR/target-feature-wrong.rs:16:1
|
2018-02-22 18:42:32 -06: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
2018-12-25 09:56:47 -06:00
--> $DIR/target-feature-wrong.rs:18:18
|
2018-02-22 18:42:32 -06:00
LL | #[target_feature(enable = "foo")]
| ^^^^^^^^^^^^^^ `foo` is not valid for this target
error: malformed `target_feature` attribute input
--> $DIR/target-feature-wrong.rs:21:18
|
2018-02-22 18:42:32 -06:00
LL | #[target_feature(bar)]
| ^^^ help: must be of the form: `enable = ".."`
error: malformed `target_feature` attribute input
--> $DIR/target-feature-wrong.rs:23:18
|
2018-02-22 18:42:32 -06:00
LL | #[target_feature(disable = "baz")]
| ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
error: #[target_feature(..)] can only be applied to `unsafe` functions
--> $DIR/target-feature-wrong.rs:27:1
|
2018-02-22 18:42:32 -06:00
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can only be applied to `unsafe` functions
...
LL | fn bar() {}
| ----------- not an `unsafe` function
error: attribute should be applied to a function
--> $DIR/target-feature-wrong.rs:33:1
|
LL | #[target_feature(enable = "sse2")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2019-03-09 06:03:44 -06:00
LL |
LL | mod another {}
| -------------- not a function
error: cannot use #[inline(always)] with #[target_feature]
--> $DIR/target-feature-wrong.rs:38:1
|
LL | #[inline(always)]
| ^^^^^^^^^^^^^^^^^
error: aborting due to 7 previous errors