blob: dda09de4c5344289939738e033d9f873300dd985 [file] [log] [blame]
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:33: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:33:9
|
LL | if (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:36: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:36:11
|
LL | if (((let 0 = 1))) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:39: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:39:9
|
LL | if (let 0 = 1) && true {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:42: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:42:17
|
LL | if true && (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:45: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:45:9
|
LL | if (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:45: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:45:24
|
LL | if (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:49: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:49: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:49: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:49: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:49: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:49: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:59: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:59:12
|
LL | while (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:62: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:62:14
|
LL | while (((let 0 = 1))) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:65: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:65:12
|
LL | while (let 0 = 1) && true {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:68: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:68:20
|
LL | while true && (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:71: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:71:12
|
LL | while (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:71: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:71:27
|
LL | while (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:75: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:75: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:75: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:75: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:75: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:75: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:103: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: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.rs:108: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:118:9
|
LL | if (let 0 = 0)? {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: `||` operators are not supported in let chain conditions
--> $DIR/disallowed-positions.rs:121:13
|
LL | if true || let 0 = 0 {}
| ^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:123: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:125: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:127: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:131: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:134: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:137: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:139: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:143: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:146: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:152: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:158: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:162: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:165:15
|
LL | if return let 0 = 0 {}
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:168:21
|
LL | loop { if break let 0 = 0 {} }
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:171:15
|
LL | if (match let 0 = 0 { _ => { false } }) {}
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:174:9
|
LL | if (let 0 = 0, false).1 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:177: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:181:13
|
LL | if (let 0 = 0).await {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:185:12
|
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:188: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:194: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:197: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:199: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:201: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:209:12
|
LL | while (let 0 = 0)? {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: `||` operators are not supported in let chain conditions
--> $DIR/disallowed-positions.rs:212:16
|
LL | while true || let 0 = 0 {}
| ^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:214: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:216: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:218: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:222: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:225: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:228: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:230: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:234: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:237: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:243: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:249: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:253: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:256:18
|
LL | while return let 0 = 0 {}
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:259:39
|
LL | 'outer: loop { while break 'outer let 0 = 0 {} }
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:262:18
|
LL | while (match let 0 = 0 { _ => { false } }) {}
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:265:12
|
LL | while (let 0 = 0, false).1 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:268: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:272:16
|
LL | while (let 0 = 0).await {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:276:15
|
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:279: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:296: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:299: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:301: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:303: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:305: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:313: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:316: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:318: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:320: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:324: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:327: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:329: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:331: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:334: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:338: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:338: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:344: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:350: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:355: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:366: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:371: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:376: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:387: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:387: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:397: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:397:9
|
LL | if (let Some(a) = opt && true) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:401: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:401:9
|
LL | if (let Some(a) = opt) && true {
| ^^^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:404: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:404:9
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
| ^^^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:404: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:404:32
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
| ^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:412: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:412:9
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:412: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:412:31
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
| ^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:416: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:416:9
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:416: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:416:31
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
| ^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:420: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:420:9
|
LL | if (let Some(a) = opt && (true)) && true {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:440: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:445: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:91: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:91:16
|
LL | use_expr!((let 0 = 1 && 0 == 0));
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:91:16
|
LL | use_expr!((let 0 = 1 && 0 == 0));
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:95:16
|
LL | use_expr!((let 0 = 1));
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:95:16
|
LL | use_expr!((let 0 = 1));
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:95:16
|
LL | use_expr!((let 0 = 1));
| ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0658]: `let` expressions in this position are unstable
--> $DIR/disallowed-positions.rs:49:8
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:49:21
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:75:11
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:75:24
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:408:8
|
LL | if let Some(a) = opt && (true && true) {
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:424:28
|
LL | if (true && (true)) && let Some(a) = opt {
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:427:18
|
LL | if (true) && let Some(a) = opt {
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:430:16
|
LL | if true && let Some(a) = opt {
| ^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:435:8
|
LL | if let true = (true && fun()) && (true) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/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:134:8
|
LL | if true..(let 0 = 0) {}
| ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
= note: expected type `bool`
found struct `std::ops::Range<bool>`
error[E0308]: mismatched types
--> $DIR/disallowed-positions.rs:143: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:146: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:152: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:158: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:114: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:225:11
|
LL | while true..(let 0 = 0) {}
| ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
= note: expected type `bool`
found struct `std::ops::Range<bool>`
error[E0308]: mismatched types
--> $DIR/disallowed-positions.rs:234: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:237: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:243: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:249: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:205: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:334: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:309: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 134 previous errors
Some errors have detailed explanations: E0277, E0308, E0658.
For more information about an error, try `rustc --explain E0277`.