1 error: malformed `target_feature` attribute input
2 --> $DIR/invalid-attribute.rs:17:1
4 LL | #[target_feature = "+sse2"]
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
7 error: attribute should be applied to a function definition
8 --> $DIR/invalid-attribute.rs:34:1
10 LL | #[target_feature(enable = "sse2")]
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 | -------------- not a function definition
16 error: attribute should be applied to a function definition
17 --> $DIR/invalid-attribute.rs:39:1
19 LL | #[target_feature(enable = "sse2")]
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 LL | const FOO: usize = 7;
23 | --------------------- not a function definition
25 error: attribute should be applied to a function definition
26 --> $DIR/invalid-attribute.rs:44:1
28 LL | #[target_feature(enable = "sse2")]
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 | ----------- not a function definition
34 error: attribute should be applied to a function definition
35 --> $DIR/invalid-attribute.rs:49:1
37 LL | #[target_feature(enable = "sse2")]
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41 | ----------- not a function definition
43 error: attribute should be applied to a function definition
44 --> $DIR/invalid-attribute.rs:54:1
46 LL | #[target_feature(enable = "sse2")]
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54 | |_- not a function definition
56 error: attribute should be applied to a function definition
57 --> $DIR/invalid-attribute.rs:62:1
59 LL | #[target_feature(enable = "sse2")]
60 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
63 | ------------ not a function definition
65 error: attribute should be applied to a function definition
66 --> $DIR/invalid-attribute.rs:85:5
68 LL | #[target_feature(enable = "sse2")]
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75 | |_____- not a function definition
77 error: attribute should be applied to a function definition
78 --> $DIR/invalid-attribute.rs:93:5
80 LL | #[target_feature(enable = "sse2")]
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84 | ----- not a function definition
86 error: the feature named `foo` is not valid for this target
87 --> $DIR/invalid-attribute.rs:19:18
89 LL | #[target_feature(enable = "foo")]
90 | ^^^^^^^^^^^^^^ `foo` is not valid for this target
92 error: malformed `target_feature` attribute input
93 --> $DIR/invalid-attribute.rs:22:18
95 LL | #[target_feature(bar)]
96 | ^^^ help: must be of the form: `enable = ".."`
98 error: malformed `target_feature` attribute input
99 --> $DIR/invalid-attribute.rs:24:18
101 LL | #[target_feature(disable = "baz")]
102 | ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
104 error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
105 --> $DIR/invalid-attribute.rs:28:1
107 LL | #[target_feature(enable = "sse2")]
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 | -------- not an `unsafe` function
113 = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information
114 = help: add `#![feature(target_feature_11)]` to the crate attributes to enable
116 error: cannot use `#[inline(always)]` with `#[target_feature]`
117 --> $DIR/invalid-attribute.rs:67:1
119 LL | #[inline(always)]
122 error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
123 --> $DIR/invalid-attribute.rs:77:5
125 LL | #[target_feature(enable = "sse2")]
126 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
129 | -------- not an `unsafe` function
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
134 error: aborting due to 15 previous errors
136 For more information about this error, try `rustc --explain E0658`.