fork/rust
git clone https://git.julia.blue/fork/rust
f3e1a954d2e
1.41.1
1error[E0658]: `if` is not allowed in a `const` 2 --> $DIR/feature-gate-const-if-match.rs:11:16 3 | 4LL | const _: i32 = if true { 5 | ________________^ 6LL | | 5 7LL | | } else { 8LL | | 6 9LL | | }; 10 | |_^ 11 | 12 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 13 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 14 15error[E0658]: `if` is not allowed in a `const` 16 --> $DIR/feature-gate-const-if-match.rs:17:16 17 | 18LL | const _: i32 = if let Some(true) = Some(false) { 19 | ________________^ 20LL | | 0 21LL | | } else { 22LL | | 1 23LL | | }; 24 | |_^ 25 | 26 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 27 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 28 29error[E0658]: `match` is not allowed in a `const` 30 --> $DIR/feature-gate-const-if-match.rs:23:16 31 | 32LL | const _: i32 = match 1 { 33 | ________________^ 34LL | | 2 => 3, 35LL | | 4 => 5, 36LL | | _ => 0, 37LL | | }; 38 | |_^ 39 | 40 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 41 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 42 43error[E0658]: `if` is not allowed in a `static` 44 --> $DIR/feature-gate-const-if-match.rs:30:13 45 | 46LL | let x = if true { 0 } else { 1 }; 47 | ^^^^^^^^^^^^^^^^^^^^^^^^ 48 | 49 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 50 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 51 52error[E0658]: `match` is not allowed in a `static` 53 --> $DIR/feature-gate-const-if-match.rs:32:13 54 | 55LL | let x = match x { 0 => 1, _ => 0 }; 56 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 57 | 58 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 59 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 60 61error[E0658]: `if` is not allowed in a `static` 62 --> $DIR/feature-gate-const-if-match.rs:34:5 63 | 64LL | if let Some(x) = Some(x) { x } else { 1 } 65 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 66 | 67 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 68 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 69 70error[E0658]: `if` is not allowed in a `static mut` 71 --> $DIR/feature-gate-const-if-match.rs:39:13 72 | 73LL | let x = if true { 0 } else { 1 }; 74 | ^^^^^^^^^^^^^^^^^^^^^^^^ 75 | 76 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 77 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 78 79error[E0658]: `match` is not allowed in a `static mut` 80 --> $DIR/feature-gate-const-if-match.rs:41:13 81 | 82LL | let x = match x { 0 => 1, _ => 0 }; 83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 84 | 85 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 86 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 87 88error[E0658]: `if` is not allowed in a `static mut` 89 --> $DIR/feature-gate-const-if-match.rs:43:5 90 | 91LL | if let Some(x) = Some(x) { x } else { 1 } 92 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 93 | 94 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 95 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 96 97error[E0658]: `if` is not allowed in a `const fn` 98 --> $DIR/feature-gate-const-if-match.rs:48:5 99 | 100LL | if true { 5 } else { 6 } 101 | ^^^^^^^^^^^^^^^^^^^^^^^^ 102 | 103 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 104 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 105 106error[E0658]: `if` is not allowed in a `const fn` 107 --> $DIR/feature-gate-const-if-match.rs:52:5 108 | 109LL | / if let Some(true) = a { 110LL | | 0 111LL | | } else { 112LL | | 1 113LL | | } 114 | |_____^ 115 | 116 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 117 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 118 119error[E0658]: `match` is not allowed in a `const fn` 120 --> $DIR/feature-gate-const-if-match.rs:60:5 121 | 122LL | / match i { 123LL | | i if i > 10 => i, 124LL | | 1 => 2, 125LL | | _ => 0 126LL | | } 127 | |_____^ 128 | 129 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 130 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 131 132error[E0658]: `if` is not allowed in a `const fn` 133 --> $DIR/feature-gate-const-if-match.rs:91:17 134 | 135LL | let x = if y { 0 } else { 1 }; 136 | ^^^^^^^^^^^^^^^^^^^^^ 137 | 138 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 139 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 140 141error[E0658]: `match` is not allowed in a `const fn` 142 --> $DIR/feature-gate-const-if-match.rs:93:17 143 | 144LL | let x = match x { 0 => 1, _ => 0 }; 145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 146 | 147 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 148 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 149 150error[E0658]: `if` is not allowed in a `const fn` 151 --> $DIR/feature-gate-const-if-match.rs:95:9 152 | 153LL | if let Some(x) = Some(x) { x } else { 1 } 154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 155 | 156 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 157 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 158 159error[E0658]: `if` is not allowed in a `const` 160 --> $DIR/feature-gate-const-if-match.rs:111:17 161 | 162LL | let x = if false { 0 } else { 1 }; 163 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 164 | 165 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 166 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 167 168error[E0658]: `match` is not allowed in a `const` 169 --> $DIR/feature-gate-const-if-match.rs:113:17 170 | 171LL | let x = match x { 0 => 1, _ => 0 }; 172 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 173 | 174 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 175 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 176 177error[E0658]: `if` is not allowed in a `const` 178 --> $DIR/feature-gate-const-if-match.rs:115:9 179 | 180LL | if let Some(x) = Some(x) { x } else { 1 } 181 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 182 | 183 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 184 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 185 186error[E0658]: `if` is not allowed in a `const` 187 --> $DIR/feature-gate-const-if-match.rs:68:21 188 | 189LL | const IF: i32 = if true { 5 } else { 6 }; 190 | ^^^^^^^^^^^^^^^^^^^^^^^^ 191 | 192 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 193 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 194 195error[E0658]: `if` is not allowed in a `const` 196 --> $DIR/feature-gate-const-if-match.rs:71:25 197 | 198LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 }; 199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 200 | 201 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 202 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 203 204error[E0658]: `match` is not allowed in a `const` 205 --> $DIR/feature-gate-const-if-match.rs:74:24 206 | 207LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 }; 208 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 209 | 210 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 211 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 212 213error[E0658]: `if` is not allowed in a `const` 214 --> $DIR/feature-gate-const-if-match.rs:79:21 215 | 216LL | const IF: i32 = if true { 5 } else { 6 }; 217 | ^^^^^^^^^^^^^^^^^^^^^^^^ 218 | 219 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 220 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 221 222error[E0658]: `if` is not allowed in a `const` 223 --> $DIR/feature-gate-const-if-match.rs:82:25 224 | 225LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 }; 226 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 227 | 228 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 229 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 230 231error[E0658]: `match` is not allowed in a `const` 232 --> $DIR/feature-gate-const-if-match.rs:85:24 233 | 234LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 }; 235 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ 236 | 237 = note: for more information, see https://github.com/rust-lang/rust/issues/49146 238 = help: add `#![feature(const_if_match)]` to the crate attributes to enable 239 240error[E0019]: constant contains unimplemented expression type 241 --> $DIR/feature-gate-const-if-match.rs:115:21 242 | 243LL | if let Some(x) = Some(x) { x } else { 1 } 244 | ^ 245 246error: aborting due to 25 previous errors 247 248Some errors have detailed explanations: E0019, E0658. 249For more information about an error, try `rustc --explain E0019`.