48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
warning: the feature `struct_target_features` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
--> $DIR/struct-target-features.rs:2:12
|
|
|
|
|
LL | #![feature(struct_target_features)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: see issue #129107 <https://github.com/rust-lang/rust/issues/129107> for more information
|
|
= note: `#[warn(incomplete_features)]` on by default
|
|
|
|
error: attribute should be applied to a function definition or unit struct
|
|
--> $DIR/struct-target-features.rs:8:1
|
|
|
|
|
LL | #[target_feature(enable = "avx")]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
LL |
|
|
LL | struct Invalid(u32);
|
|
| -------------------- not a function definition or a unit struct
|
|
|
|
error: cannot use a struct with target features in a function with non-Rust ABI
|
|
--> $DIR/struct-target-features.rs:37:1
|
|
|
|
|
LL | extern "C" fn bad_fun(_: Avx) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: cannot use a struct with target features in a #[inline(always)] function
|
|
--> $DIR/struct-target-features.rs:42:1
|
|
|
|
|
LL | fn inline_fun(_: Avx) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: cannot use `#[inline(always)]` with `#[target_feature]`
|
|
--> $DIR/struct-target-features.rs:40:1
|
|
|
|
|
LL | #[inline(always)]
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0133]: initializing type with `target_feature` attr is unsafe and requires unsafe function or block
|
|
--> $DIR/struct-target-features.rs:86:5
|
|
|
|
|
LL | Avx {};
|
|
| ^^^^^^ initializing type with `target_feature` attr
|
|
|
|
|
= note: this struct can only be constructed if the corresponding `target_feature`s are available
|
|
|
|
error: aborting due to 5 previous errors; 1 warning emitted
|
|
|
|
For more information about this error, try `rustc --explain E0133`.
|