error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:31: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.rs:31:9 | LL | if (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:34: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.rs:34:11 | LL | if (((let 0 = 1))) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:37: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.rs:37:9 | LL | if (let 0 = 1) && true {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:40: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.rs:40:17 | LL | if true && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:43: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.rs:43:9 | LL | if (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:43: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.rs:43:24 | LL | if (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:47:35 | LL | if let 0 = 1 && let 1 = 2 && (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.rs:47:35 | LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:47:48 | LL | if let 0 = 1 && let 1 = 2 && (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.rs:47:35 | LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:47:61 | LL | if let 0 = 1 && let 1 = 2 && (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.rs:47:35 | LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:56: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.rs:56:12 | LL | while (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:59: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.rs:59:14 | LL | while (((let 0 = 1))) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:62: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.rs:62:12 | LL | while (let 0 = 1) && true {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:65: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.rs:65:20 | LL | while true && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:68: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.rs:68:12 | LL | while (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:68: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.rs:68:27 | LL | while (let 0 = 1) && (let 0 = 1) {} | ^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:72:38 | LL | while let 0 = 1 && let 1 = 2 && (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.rs:72:38 | LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:72:51 | LL | while let 0 = 1 && let 1 = 2 && (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.rs:72:38 | LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:72:64 | LL | while let 0 = 1 && let 1 = 2 && (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.rs:72:38 | LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:95: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.rs:98: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.rs:100: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.rs:102: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.rs:110: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.rs:113: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.rs:113:13 | LL | if true || let 0 = 0 {} | ^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:115: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.rs:117: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.rs:119: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.rs:123: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.rs:126: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.rs:129: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.rs:131: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.rs:135: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.rs:138: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.rs:144: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.rs:150: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.rs:154: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.rs:160: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.rs:163: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.rs:165: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.rs:167: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.rs:175: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.rs:178: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.rs:178:16 | LL | while true || let 0 = 0 {} | ^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:180: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.rs:182: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.rs:184: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.rs:188: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.rs:191: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.rs:194: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.rs:196: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.rs:200: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.rs:203: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.rs:209: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.rs:215: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.rs:219: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.rs:236: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.rs:239: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.rs:241: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.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.rs:245: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.rs:253: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.rs:256: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.rs:258: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.rs:260: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.rs:264: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.rs:267: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.rs:269: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.rs:271: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.rs:274: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.rs:278: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.rs:278: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.rs:284: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.rs:290: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.rs:295: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.rs:306: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.rs:311: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.rs:316: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.rs:327: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.rs:327: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.rs:337: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.rs:337:9 | LL | if (let Some(a) = opt && true) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:341: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.rs:341:9 | LL | if (let Some(a) = opt) && true { | ^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:344: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.rs:344:9 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | ^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:344: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.rs:344:32 | LL | if (let Some(a) = opt) && (let Some(b) = a) { | ^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:351: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.rs:351:9 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:351: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.rs:351:31 | LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 { | ^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:355: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.rs:355:9 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:355: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.rs:355:31 | LL | if (let Some(a) = opt && (let Some(b) = a)) && true { | ^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:359: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.rs:359:9 | LL | if (let Some(a) = opt && (true)) && true { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected expression, found `let` statement --> $DIR/disallowed-positions.rs:375: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.rs:380: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.rs:87: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.rs:89:16 | LL | use_expr!((let 0 = 1)); | ^^^ | = note: only supported directly in conditions of `if` and `while` expressions error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:47:8 | LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:47:21 | LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:72:11 | LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:72:24 | LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {} | ^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:348:8 | LL | if let Some(a) = opt && (true && true) { | ^^^^^^^^^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:363:28 | LL | if (true && (true)) && let Some(a) = opt { | ^^^^^^^^^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:365:18 | LL | if (true) && let Some(a) = opt { | ^^^^^^^^^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:367:16 | LL | if true && let Some(a) = opt { | ^^^^^^^^^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0658]: `let` expressions in this position are unstable --> $DIR/disallowed-positions.rs:371:8 | LL | if let true = (true && fun()) && (true) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #53667 for more information = help: add `#![feature(let_chains)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date error[E0308]: mismatched types --> $DIR/disallowed-positions.rs:126: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.rs:135: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.rs:138: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.rs:144: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.rs:150: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.rs:106: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.rs:191: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.rs:200: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.rs:203: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.rs:209: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.rs:215: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.rs:171: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.rs:274: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.rs:249: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 114 previous errors Some errors have detailed explanations: E0277, E0308, E0658. For more information about an error, try `rustc --explain E0277`.