fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error: malformed `target_feature` attribute input 2 --> $DIR/invalid-attribute.rs:20:1 3 | 4LL | #[target_feature = "+sse2"] 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]` 6 7error: attribute should be applied to a function definition 8 --> $DIR/invalid-attribute.rs:5:1 9 | 10LL | #[target_feature(enable = "sse2")] 11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12LL | 13LL | extern crate alloc; 14 | ------------------- not a function definition 15 16error: attribute should be applied to a function definition 17 --> $DIR/invalid-attribute.rs:10:1 18 | 19LL | #[target_feature(enable = "sse2")] 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 21LL | 22LL | use alloc::alloc::alloc; 23 | ------------------------ not a function definition 24 25error: attribute should be applied to a function definition 26 --> $DIR/invalid-attribute.rs:15:1 27 | 28LL | #[target_feature(enable = "sse2")] 29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 30LL | 31LL | extern "Rust" {} 32 | ---------------- not a function definition 33 34error: attribute should be applied to a function definition 35 --> $DIR/invalid-attribute.rs:37:1 36 | 37LL | #[target_feature(enable = "sse2")] 38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 39LL | 40LL | mod another {} 41 | -------------- not a function definition 42 43error: attribute should be applied to a function definition 44 --> $DIR/invalid-attribute.rs:42:1 45 | 46LL | #[target_feature(enable = "sse2")] 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 48LL | 49LL | const FOO: usize = 7; 50 | --------------------- not a function definition 51 52error: attribute should be applied to a function definition 53 --> $DIR/invalid-attribute.rs:47:1 54 | 55LL | #[target_feature(enable = "sse2")] 56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 57LL | 58LL | struct Foo; 59 | ----------- not a function definition 60 61error: attribute should be applied to a function definition 62 --> $DIR/invalid-attribute.rs:52:1 63 | 64LL | #[target_feature(enable = "sse2")] 65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 66LL | 67LL | enum Bar {} 68 | ----------- not a function definition 69 70error: attribute should be applied to a function definition 71 --> $DIR/invalid-attribute.rs:57:1 72 | 73LL | #[target_feature(enable = "sse2")] 74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 75LL | 76LL | / union Qux { 77LL | | 78LL | | f1: u16, 79LL | | f2: u16, 80LL | | } 81 | |_- not a function definition 82 83error: attribute should be applied to a function definition 84 --> $DIR/invalid-attribute.rs:65:1 85 | 86LL | #[target_feature(enable = "sse2")] 87 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 88LL | 89LL | type Uwu = (); 90 | -------------- not a function definition 91 92error: attribute should be applied to a function definition 93 --> $DIR/invalid-attribute.rs:70:1 94 | 95LL | #[target_feature(enable = "sse2")] 96 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 97LL | 98LL | trait Baz {} 99 | ------------ not a function definition 100 101error: attribute should be applied to a function definition 102 --> $DIR/invalid-attribute.rs:80:1 103 | 104LL | #[target_feature(enable = "sse2")] 105 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 106LL | 107LL | static A: () = (); 108 | ------------------ not a function definition 109 110error: attribute should be applied to a function definition 111 --> $DIR/invalid-attribute.rs:85:1 112 | 113LL | #[target_feature(enable = "sse2")] 114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 115LL | 116LL | impl Quux for u8 {} 117 | ------------------- not a function definition 118 119error: attribute should be applied to a function definition 120 --> $DIR/invalid-attribute.rs:90:1 121 | 122LL | #[target_feature(enable = "sse2")] 123 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 124LL | 125LL | impl Foo {} 126 | ----------- not a function definition 127 128error: attribute should be applied to a function definition 129 --> $DIR/invalid-attribute.rs:108:5 130 | 131LL | #[target_feature(enable = "sse2")] 132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 133LL | 134LL | / unsafe { 135LL | | foo(); 136LL | | bar(); 137LL | | } 138 | |_____- not a function definition 139 140error: attribute should be applied to a function definition 141 --> $DIR/invalid-attribute.rs:116:5 142 | 143LL | #[target_feature(enable = "sse2")] 144 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 145LL | 146LL | || {}; 147 | ----- not a function definition 148 149error: the feature named `foo` is not valid for this target 150 --> $DIR/invalid-attribute.rs:22:18 151 | 152LL | #[target_feature(enable = "foo")] 153 | ^^^^^^^^^^^^^^ `foo` is not valid for this target 154 155error: malformed `target_feature` attribute input 156 --> $DIR/invalid-attribute.rs:25:18 157 | 158LL | #[target_feature(bar)] 159 | ^^^ help: must be of the form: `enable = ".."` 160 161error: malformed `target_feature` attribute input 162 --> $DIR/invalid-attribute.rs:27:18 163 | 164LL | #[target_feature(disable = "baz")] 165 | ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."` 166 167error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions 168 --> $DIR/invalid-attribute.rs:31:1 169 | 170LL | #[target_feature(enable = "sse2")] 171 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 172... 173LL | fn bar() {} 174 | -------- not an `unsafe` function 175 | 176 = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information 177 = help: add `#![feature(target_feature_11)]` to the crate attributes to enable 178 179error: cannot use `#[inline(always)]` with `#[target_feature]` 180 --> $DIR/invalid-attribute.rs:75:1 181 | 182LL | #[inline(always)] 183 | ^^^^^^^^^^^^^^^^^ 184 185error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions 186 --> $DIR/invalid-attribute.rs:100:5 187 | 188LL | #[target_feature(enable = "sse2")] 189 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 190... 191LL | fn foo() {} 192 | -------- not an `unsafe` function 193 | 194 = note: see issue #69098 <https://github.com/rust-lang/rust/issues/69098> for more information 195 = help: add `#![feature(target_feature_11)]` to the crate attributes to enable 196 197error: aborting due to 22 previous errors 198 199For more information about this error, try `rustc --explain E0658`.