]>
Commit | Line | Data |
---|---|---|
e74abb32 | 1 | error: malformed `target_feature` attribute input |
1b1a35ee | 2 | --> $DIR/invalid-attribute.rs:18:1 |
e74abb32 XL |
3 | | |
4 | LL | #[target_feature = "+sse2"] | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]` | |
6 | ||
7 | error: the feature named `foo` is not valid for this target | |
1b1a35ee | 8 | --> $DIR/invalid-attribute.rs:20:18 |
e74abb32 XL |
9 | | |
10 | LL | #[target_feature(enable = "foo")] | |
11 | | ^^^^^^^^^^^^^^ `foo` is not valid for this target | |
12 | ||
13 | error: malformed `target_feature` attribute input | |
1b1a35ee | 14 | --> $DIR/invalid-attribute.rs:23:18 |
e74abb32 XL |
15 | | |
16 | LL | #[target_feature(bar)] | |
17 | | ^^^ help: must be of the form: `enable = ".."` | |
18 | ||
19 | error: malformed `target_feature` attribute input | |
1b1a35ee | 20 | --> $DIR/invalid-attribute.rs:25:18 |
e74abb32 XL |
21 | | |
22 | LL | #[target_feature(disable = "baz")] | |
23 | | ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."` | |
24 | ||
f9f354fc | 25 | error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions |
1b1a35ee | 26 | --> $DIR/invalid-attribute.rs:29:1 |
e74abb32 XL |
27 | | |
28 | LL | #[target_feature(enable = "sse2")] | |
f9f354fc | 29 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
e74abb32 XL |
30 | ... |
31 | LL | fn bar() {} | |
3dfed10e | 32 | | -------- not an `unsafe` function |
f9f354fc XL |
33 | | |
34 | = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information | |
35 | = help: add `#![feature(target_feature_11)]` to the crate attributes to enable | |
e74abb32 XL |
36 | |
37 | error: attribute should be applied to a function | |
1b1a35ee | 38 | --> $DIR/invalid-attribute.rs:35:1 |
e74abb32 XL |
39 | | |
40 | LL | #[target_feature(enable = "sse2")] | |
41 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
42 | LL | | |
43 | LL | mod another {} | |
44 | | -------------- not a function | |
45 | ||
46 | error: attribute should be applied to a function | |
1b1a35ee | 47 | --> $DIR/invalid-attribute.rs:40:1 |
e74abb32 XL |
48 | | |
49 | LL | #[target_feature(enable = "sse2")] | |
50 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
51 | LL | | |
52 | LL | const FOO: usize = 7; | |
53 | | --------------------- not a function | |
54 | ||
55 | error: attribute should be applied to a function | |
1b1a35ee | 56 | --> $DIR/invalid-attribute.rs:45:1 |
e74abb32 XL |
57 | | |
58 | LL | #[target_feature(enable = "sse2")] | |
59 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
60 | LL | | |
61 | LL | struct Foo; | |
62 | | ----------- not a function | |
63 | ||
64 | error: attribute should be applied to a function | |
1b1a35ee | 65 | --> $DIR/invalid-attribute.rs:50:1 |
e74abb32 XL |
66 | | |
67 | LL | #[target_feature(enable = "sse2")] | |
68 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
69 | LL | | |
1b1a35ee XL |
70 | LL | enum Bar {} |
71 | | ----------- not a function | |
e74abb32 XL |
72 | |
73 | error: attribute should be applied to a function | |
1b1a35ee | 74 | --> $DIR/invalid-attribute.rs:55:1 |
e74abb32 | 75 | | |
1b1a35ee XL |
76 | LL | #[target_feature(enable = "sse2")] |
77 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
e74abb32 | 78 | LL | |
1b1a35ee XL |
79 | LL | / union Qux { |
80 | LL | | | |
81 | LL | | f1: u16, | |
82 | LL | | f2: u16, | |
83 | LL | | } | |
84 | | |_- not a function | |
e74abb32 XL |
85 | |
86 | error: attribute should be applied to a function | |
1b1a35ee | 87 | --> $DIR/invalid-attribute.rs:63:1 |
e74abb32 XL |
88 | | |
89 | LL | #[target_feature(enable = "sse2")] | |
90 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
91 | LL | | |
1b1a35ee XL |
92 | LL | trait Baz {} |
93 | | ------------ not a function | |
e74abb32 XL |
94 | |
95 | error: cannot use `#[inline(always)]` with `#[target_feature]` | |
1b1a35ee | 96 | --> $DIR/invalid-attribute.rs:68:1 |
e74abb32 XL |
97 | | |
98 | LL | #[inline(always)] | |
99 | | ^^^^^^^^^^^^^^^^^ | |
100 | ||
1b1a35ee | 101 | error: attribute should be applied to a function |
f035d41b | 102 | --> $DIR/invalid-attribute.rs:86:5 |
f9f354fc | 103 | | |
1b1a35ee XL |
104 | LL | #[target_feature(enable = "sse2")] |
105 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
106 | LL | | |
107 | LL | / unsafe { | |
108 | LL | | foo(); | |
109 | LL | | bar(); | |
110 | LL | | } | |
111 | | |_____- not a function | |
112 | ||
113 | error: attribute should be applied to a function | |
114 | --> $DIR/invalid-attribute.rs:94:5 | |
115 | | | |
f9f354fc XL |
116 | LL | #[target_feature(enable = "sse2")] |
117 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
1b1a35ee | 118 | LL | |
f9f354fc | 119 | LL | || {}; |
1b1a35ee | 120 | | ----- not a function |
f9f354fc XL |
121 | |
122 | error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions | |
1b1a35ee | 123 | --> $DIR/invalid-attribute.rs:78:5 |
f9f354fc XL |
124 | | |
125 | LL | #[target_feature(enable = "sse2")] | |
126 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
127 | ... | |
128 | LL | fn foo() {} | |
3dfed10e | 129 | | -------- not an `unsafe` function |
f9f354fc XL |
130 | | |
131 | = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information | |
132 | = help: add `#![feature(target_feature_11)]` to the crate attributes to enable | |
133 | ||
1b1a35ee | 134 | error: aborting due to 15 previous errors |
e74abb32 | 135 | |
f9f354fc | 136 | For more information about this error, try `rustc --explain E0658`. |