summary refs log tree commit diff
path: root/tests/ui/target-feature/struct-target-features.stderr
blob: 5ef863f504ee15a4b572e4ebe95ca6f9d5262857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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`.