error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:11:9 | LL | if (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:11:9 | LL | if (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:14:11 | LL | if (((let 0 = 1))) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:14:11 | LL | if (((let 0 = 1))) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:17:9 | LL | if (let 0 = 1) && true {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:17:9 | LL | if (let 0 = 1) && true {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:20:17 | LL | if true && (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:20:17 | LL | if true && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:23:9 | LL | if (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:23:9 | LL | if (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:23:24 | LL | if (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:23:24 | LL | if (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:27:9 | LL | if (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:27:9 | LL | if (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:27:22 | LL | if (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:27:9 | LL | if (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:27:35 | LL | if (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:27:9 | LL | if (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:34:12 | LL | while (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:34:12 | LL | while (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:37:14 | LL | while (((let 0 = 1))) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:37:14 | LL | while (((let 0 = 1))) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:40:12 | LL | while (let 0 = 1) && true {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:40:12 | LL | while (let 0 = 1) && true {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:43:20 | LL | while true && (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:43:20 | LL | while true && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:46:12 | LL | while (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:46:12 | LL | while (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:46:27 | LL | while (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:46:27 | LL | while (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:50:12 | LL | while (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:50:12 | LL | while (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:50:25 | LL | while (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:50:12 | LL | while (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:50:38 | LL | while (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:50:12 | LL | while (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:70:9 | LL | if &let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:73:9 | LL | if !let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:75:9 | LL | if *let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:77:9 | LL | if -let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:85:9 | LL | if (let 0 = 0)? {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:88:16 | LL | if true || let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `||` operators are not supported in let chain expressions --> $DIR/disallowed-positions-without-feature-gate.rs:88:13 | LL | if true || let 0 = 0 {} | ^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:90:17 | LL | if (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:92:25 | LL | if true && (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:94:25 | LL | if true || (true && let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:98:12 | LL | if x = let 0 = 0 {} | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:101:15 | LL | if true..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:104:11 | LL | if ..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:106:9 | LL | if (let 0 = 0).. {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:110:8 | LL | if let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:113:8 | LL | if let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:119:8 | LL | if let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:125:8 | LL | if let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:129:19 | LL | if let true = let true = true {} | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:134:12 | LL | while &let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:137:12 | LL | while !let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:139:12 | LL | while *let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:141:12 | LL | while -let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:149:12 | LL | while (let 0 = 0)? {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:152:19 | LL | while true || let 0 = 0 {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `||` operators are not supported in let chain expressions --> $DIR/disallowed-positions-without-feature-gate.rs:152:16 | LL | while true || let 0 = 0 {} | ^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:154:20 | LL | while (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:156:28 | LL | while true && (true || let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:158:28 | LL | while true || (true && let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:162:15 | LL | while x = let 0 = 0 {} | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:165:18 | LL | while true..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:168:14 | LL | while ..(let 0 = 0) {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:170:12 | LL | while (let 0 = 0).. {} | ^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:174:11 | LL | while let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:177:11 | LL | while let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:183:11 | LL | while let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:189:11 | LL | while let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:193:22 | LL | while let true = let true = true {} | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:208:6 | LL | &let 0 = 0; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:211:6 | LL | !let 0 = 0; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:213:6 | LL | *let 0 = 0; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:215:6 | LL | -let 0 = 0; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:217:13 | LL | let _ = let _ = 3; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:225:6 | LL | (let 0 = 0)?; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:228:13 | LL | true || let 0 = 0; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:230:14 | LL | (true || let 0 = 0); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:232:22 | LL | true && (true || let 0 = 0); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:236:9 | LL | x = let 0 = 0; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:239:12 | LL | true..(let 0 = 0); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:241:8 | LL | ..(let 0 = 0); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:243:6 | LL | (let 0 = 0)..; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:246:6 | LL | (let Range { start: _, end: _ } = true..true || false); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:250:6 | LL | (let true = let true = true); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:250:17 | LL | (let true = let true = true); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:256:25 | LL | let x = true && let y = 1; | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:262:19 | LL | [1, 2, 3][let _ = ()] | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:267:6 | LL | &let 0 = 0 | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:277:17 | LL | true && let 1 = 1 | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:282:17 | LL | true && let 1 = 1 | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:287:17 | LL | true && let 1 = 1 | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:298:17 | LL | true && let 1 = 1 | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expressions must be enclosed in braces to be used as const generic arguments --> $DIR/disallowed-positions-without-feature-gate.rs:298:9 | LL | true && let 1 = 1 | ^^^^^^^^^^^^^^^^^ | help: enclose the `const` expression in braces | LL | { true && let 1 = 1 } | + + error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:307:9 | LL | if (let Some(a) = opt && true) { | ^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:307:9 | LL | if (let Some(a) = opt && true) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:311:9 | LL | if (let Some(a) = opt) && true { | ^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:311:9 | LL | if (let Some(a) = opt) && true { | ^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:314:9 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | ^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:314:9 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | ^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:314:32 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:314:32 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | ^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:319:9 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | ^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:319:9 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:319:31 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:319:31 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | ^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:323:9 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | ^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:323:9 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:323:31 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | ^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:323:31 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | ^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:327:9 | LL | if (let Some(a) = opt && (true)) && true { | ^^^^^^^^^^^^^^^^^ | = note: only supported directly in conditions of `if` and `while` expressions note: `let`s wrapped in parentheses are not supported in a context with let chains --> $DIR/disallowed-positions-without-feature-gate.rs:327:9 | LL | if (let Some(a) = opt && (true)) && true { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:332:22 | LL | let x = (true && let y = 1); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:337:20 | LL | ([1, 2, 3][let _ = ()]) | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:63:16 | LL | use_expr!((let 0 = 1 && 0 == 0)); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error: expected expression, found `let` statement --> $DIR/disallowed-positions-without-feature-gate.rs:65:16 | LL | use_expr!((let 0 = 1)); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:101:8 | LL | if true..(let 0 = 0) {} | ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range` | = note: expected type `bool` found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:110:12 | LL | if let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:113:12 | LL | if let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:119:12 | LL | if let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool` | | | expected fn pointer, found `Range<_>` | = note: expected fn pointer `fn() -> bool` found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:125:12 | LL | if let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions-without-feature-gate.rs:81:20 | LL | if let 0 = 0? {} | ^^ the `?` operator cannot be applied to type `{integer}` | = help: the trait `Try` is not implemented for `{integer}` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:165:11 | LL | while true..(let 0 = 0) {} | ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range` | = note: expected type `bool` found struct `std::ops::Range` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:174:15 | LL | while let Range { start: _, end: _ } = true..true && false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:177:15 | LL | while let Range { start: _, end: _ } = true..true || false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:183:15 | LL | while let Range { start: F, end } = F..|| true {} | ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool` | | | expected fn pointer, found `Range<_>` | = note: expected fn pointer `fn() -> bool` found struct `std::ops::Range<_>` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:189:15 | LL | while let Range { start: true, end } = t..&&false {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions-without-feature-gate.rs:145:23 | LL | while let 0 = 0? {} | ^^ the `?` operator cannot be applied to type `{integer}` | = help: the trait `Try` is not implemented for `{integer}` error[E0308]: mismatched types --> $DIR/disallowed-positions-without-feature-gate.rs:246:10 | LL | (let Range { start: _, end: _ } = true..true || false); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool` | | | expected `bool`, found `Range<_>` | = note: expected type `bool` found struct `std::ops::Range<_>` error[E0277]: the `?` operator can only be applied to values that implement `Try` --> $DIR/disallowed-positions-without-feature-gate.rs:221:17 | LL | let 0 = 0?; | ^^ the `?` operator cannot be applied to type `{integer}` | = help: the trait `Try` is not implemented for `{integer}` error: aborting due to 105 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`.