2022-06-25 06:08:38 -05:00
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:29:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:33:11
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (((let 0 = 1))) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:37:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) && true {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:41:17
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if true && (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:45:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:45:24
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:35
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:48
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:61
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:61:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:65:14
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (((let 0 = 1))) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:69:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) && true {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:73:20
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while true && (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:77:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:77:27
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:38
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:51
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:64
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:110:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if &let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:115:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if !let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:118:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if *let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:122:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if -let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:132:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:138:16
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if true || let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:141:17
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (true || let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:144:25
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if true && (true || let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:147:25
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | if true || (true && let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:152:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if x = let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:157:15
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if true..(let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:161:11
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if ..(let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:165:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0).. {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:196:19
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if let true = let true = true {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:202:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while &let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:207:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while !let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:210:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while *let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:214:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while -let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:224:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:230:19
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while true || let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:233:20
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (true || let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:236:28
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while true && (true || let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:239:28
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | while true || (true && let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:244:15
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while x = let 0 = 0 {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:249:18
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while true..(let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:253:14
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while ..(let 0 = 0) {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:257:12
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0).. {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:288:22
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | while let true = let true = true {}
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:304:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | &let 0 = 0;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:308:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | !let 0 = 0;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:311:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | *let 0 = 0;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:315:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | -let 0 = 0;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:325:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:331:13
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | true || let 0 = 0;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:334:14
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | (true || let 0 = 0);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:337:22
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | true && (true || let 0 = 0);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:342:9
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | x = let 0 = 0;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:346:12
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | true..(let 0 = 0);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:349:8
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | ..(let 0 = 0);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:352:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)..;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:356:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | (let Range { start: _, end: _ } = true..true || false);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:361:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | (let true = let true = true);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:361:17
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | (let true = let true = true);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:368:25
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | let x = true && let y = 1;
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:374:19
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | [1, 2, 3][let _ = ()]
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:379:6
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | &let 0 = 0
|
|
|
|
| ^^^
|
|
|
|
|
2022-07-31 20:13:16 -05:00
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:391:17
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:397:17
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:403:17
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:415:17
|
2022-07-31 20:13:16 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^
|
|
|
|
|
2020-10-03 13:30:32 -05:00
|
|
|
error: expressions must be enclosed in braces to be used as const generic arguments
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:415:9
|
2019-05-20 23:50:53 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
2020-10-03 13:30:32 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: enclose the `const` expression in braces
|
|
|
|
|
|
|
|
|
LL | { true && let 1 = 1 }
|
2021-06-21 21:07:19 -05:00
|
|
|
| + +
|
2019-05-20 23:50:53 -05:00
|
|
|
|
2022-06-25 06:08:38 -05:00
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:425:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && true) {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:430:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt) && true {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:434:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:434:32
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:443:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:443:31
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:449:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:449:31
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:455:9
|
2022-07-08 05:25:50 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (true)) && true {
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:472:22
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | let x = (true && let y = 1);
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:477:20
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | ([1, 2, 3][let _ = ()])
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:99:16
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1 && 0 == 0));
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: expected expression, found `let` statement
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:103:16
|
2022-06-25 06:08:38 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1));
|
|
|
|
| ^^^
|
|
|
|
|
2019-05-11 08:06:36 -05:00
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:29:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
2022-03-31 16:33:05 -05:00
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:29:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:33:11
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:33:11
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (((let 0 = 1))) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:37:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:37:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) && true {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:41:17
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:41:17
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if true && (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:45:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:45:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:45:24
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:45:24
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:35
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:35
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:48
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:35
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:61
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:51:35
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:61:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:61:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:65:14
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:65:14
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (((let 0 = 1))) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:69:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:69:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) && true {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:73:20
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:73:20
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while true && (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:77:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:77:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:77:27
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:77:27
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 1) && (let 0 = 1) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:38
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:38
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:51
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:38
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:64
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:83:38
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:99:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1 && 0 == 0));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:99:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1 && 0 == 0));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:99:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1 && 0 == 0));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= 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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:99:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1 && 0 == 0));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:103:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:103:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:103:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:103:16
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | use_expr!((let 0 = 1));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:110:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
2019-05-11 08:06:36 -05:00
|
|
|
LL | if &let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:115:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if !let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:118:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:122:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:132:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:132:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:138:16
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if true || let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:138:13
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | if true || let 0 = 0 {}
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:141:17
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:141:14
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | if (true || let 0 = 0) {}
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:144:25
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if true && (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:144:22
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | if true && (true || let 0 = 0) {}
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:147:25
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if true || (true && let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:147:17
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | if true || (true && let 0 = 0) {}
|
2022-03-31 16:33:05 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:152:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if x = let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:157:15
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if true..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:157:15
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if true..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:161:11
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if ..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:161:11
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if ..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:165:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0).. {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:165:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0).. {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:171:8
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true && false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:175:8
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true || false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:182:8
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:190:8
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:196:19
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if let true = let true = true {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:202:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while &let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:207:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while !let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:210:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:214:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:224:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:224:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:230:19
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while true || let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:230:16
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | while true || let 0 = 0 {}
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:233:20
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:233:17
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | while (true || let 0 = 0) {}
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:236:28
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while true && (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:236:25
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | while true && (true || let 0 = 0) {}
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:239:28
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while true || (true && let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:239:20
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | while true || (true && let 0 = 0) {}
|
2022-03-31 16:33:05 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:244:15
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while x = let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:249:18
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while true..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:249:18
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while true..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:253:14
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while ..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:253:14
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while ..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:257:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0).. {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:257:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0).. {}
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:263:11
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true && false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:267:11
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true || false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:274:11
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:282:11
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:288:22
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | while let true = let true = true {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:304:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | &let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:308:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | !let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:311:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | *let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:315:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | -let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:325:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:325:6
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:331:13
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | true || let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:331:10
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | true || let 0 = 0;
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:334:14
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | (true || let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:334:11
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | (true || let 0 = 0);
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:337:22
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | true && (true || let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `||` operators are not supported in let chain expressions
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:337:19
|
2022-03-09 12:04:09 -06:00
|
|
|
|
|
|
|
|
LL | true && (true || let 0 = 0);
|
|
|
|
| ^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:342:9
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | x = let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:346:12
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | true..(let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:346:12
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | true..(let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:349:8
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | ..(let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:349:8
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | ..(let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:352:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)..;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:352:6
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)..;
|
|
|
|
| ^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:356:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | (let Range { start: _, end: _ } = true..true || false);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:361:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | (let true = let true = true);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
note: `let`s wrapped in parentheses are not supported in a context with let chains
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:361:6
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | (let true = let true = true);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:379:6
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | &let 0 = 0
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-11 08:06:36 -05:00
|
|
|
|
2019-05-20 23:50:53 -05:00
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:391:17
|
2019-05-20 23:50:53 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-20 23:50:53 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:397:17
|
2019-05-20 23:50:53 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-20 23:50:53 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:403:17
|
2019-05-20 23:50:53 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2019-05-20 23:50:53 -05:00
|
|
|
|
2020-10-03 13:30:32 -05:00
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:415:17
|
2020-10-03 13:30:32 -05:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2022-03-09 12:04:09 -06:00
|
|
|
= note: only supported directly in conditions of `if` and `while` expressions
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:425:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:425:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && true) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:430:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:430:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt) && true {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:434:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:434:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:434:32
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:434:32
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:443:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:443:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:443:31
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:443:31
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:449:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:449:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:449:31
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:449:31
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:455:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
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
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:455:9
|
2022-03-31 16:33:05 -05:00
|
|
|
|
|
|
|
|
LL | if (let Some(a) = opt && (true)) && true {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-10-03 13:30:32 -05:00
|
|
|
|
2019-06-17 00:38:26 -05:00
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:110:8
|
2019-05-11 08:06:36 -05:00
|
|
|
|
|
|
|
|
LL | if &let 0 = 0 {}
|
2021-06-28 13:22:47 -05:00
|
|
|
| ^^^^^^^^^^ expected `bool`, found `&bool`
|
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - if &let 0 = 0 {}
|
|
|
|
LL + if let 0 = 0 {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0614]: type `bool` cannot be dereferenced
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:118:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `bool`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:122:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^ cannot apply unary operator `-`
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:132:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Try` is not implemented for `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2021-04-17 13:56:07 -05:00
|
|
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:132:19
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2022-09-01 14:52:39 -05:00
|
|
|
LL | fn nested_within_if_expr() {
|
|
|
|
| -------------------------- this function should return `Result` or `Option` to accept `?`
|
|
|
|
...
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^ cannot use the `?` operator in a function that returns `()`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2021-04-17 13:56:07 -05:00
|
|
|
= help: the trait `FromResidual<_>` is not implemented for `()`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:152:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if x = let 0 = 0 {}
|
2020-08-25 22:28:25 -05:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
|
|
|
|
|
help: you might have meant to compare for equality
|
|
|
|
|
|
|
|
|
LL | if x == let 0 = 0 {}
|
2022-10-05 08:51:22 -05:00
|
|
|
| +
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:157:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if true..(let 0 = 0) {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:161:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if ..(let 0 = 0) {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `RangeTo<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 02:40:56 -05:00
|
|
|
found struct `RangeTo<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:165:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0).. {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `RangeFrom<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 02:40:56 -05:00
|
|
|
found struct `RangeFrom<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:171:12
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true && false {}
|
2019-12-30 00:02:24 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:171:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true && false {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:175:12
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true || false {}
|
2019-12-30 00:02:24 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:175:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true || false {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:182:12
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
2021-12-13 23:22:02 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool`
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected fn pointer, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected fn pointer `fn() -> bool`
|
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:182:41
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^ expected `bool`, found closure
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2022-08-20 13:40:08 -05:00
|
|
|
found closure `[closure@$DIR/disallowed-positions.rs:182:41: 182:43]`
|
2022-06-20 01:11:31 -05:00
|
|
|
help: use parentheses to call this closure
|
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..(|| true)() {}
|
|
|
|
| + +++
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:182:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:190:12
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
2019-12-30 02:08:18 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:190:44
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^ expected `bool`, found `&&bool`
|
2021-12-04 22:51:36 -06:00
|
|
|
|
|
|
|
|
help: consider removing the `&&`
|
|
|
|
|
|
|
|
|
LL - if let Range { start: true, end } = t..&&false {}
|
|
|
|
LL + if let Range { start: true, end } = t..false {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:190:8
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:128:20
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | if let 0 = 0? {}
|
|
|
|
| ^^ the `?` operator cannot be applied to type `{integer}`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Try` is not implemented for `{integer}`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:202:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while &let 0 = 0 {}
|
2021-06-28 13:22:47 -05:00
|
|
|
| ^^^^^^^^^^ expected `bool`, found `&bool`
|
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - while &let 0 = 0 {}
|
|
|
|
LL + while let 0 = 0 {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0614]: type `bool` cannot be dereferenced
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:210:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `bool`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:214:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^ cannot apply unary operator `-`
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:224:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Try` is not implemented for `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2021-04-17 13:56:07 -05:00
|
|
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:224:22
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2022-09-01 14:52:39 -05:00
|
|
|
LL | fn nested_within_while_expr() {
|
|
|
|
| ----------------------------- this function should return `Result` or `Option` to accept `?`
|
|
|
|
...
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^ cannot use the `?` operator in a function that returns `()`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2021-04-17 13:56:07 -05:00
|
|
|
= help: the trait `FromResidual<_>` is not implemented for `()`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:244:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while x = let 0 = 0 {}
|
2020-08-25 22:28:25 -05:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
|
|
|
|
|
help: you might have meant to compare for equality
|
|
|
|
|
|
|
|
|
LL | while x == let 0 = 0 {}
|
2022-10-05 08:51:22 -05:00
|
|
|
| +
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:249:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while true..(let 0 = 0) {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:253:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while ..(let 0 = 0) {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `RangeTo<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 02:40:56 -05:00
|
|
|
found struct `RangeTo<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:257:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0).. {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `RangeFrom<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 02:40:56 -05:00
|
|
|
found struct `RangeFrom<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:263:15
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true && false {}
|
2019-12-30 00:02:24 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:263:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true && false {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:267:15
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true || false {}
|
2019-12-30 00:02:24 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:267:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true || false {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:274:15
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
2021-12-13 23:22:02 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool`
|
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected fn pointer, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected fn pointer `fn() -> bool`
|
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:274:44
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^ expected `bool`, found closure
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2022-08-20 13:40:08 -05:00
|
|
|
found closure `[closure@$DIR/disallowed-positions.rs:274:44: 274:46]`
|
2022-06-20 01:11:31 -05:00
|
|
|
help: use parentheses to call this closure
|
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..(|| true)() {}
|
|
|
|
| + +++
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:274:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:282:15
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
2019-12-30 02:08:18 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:282:47
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^ expected `bool`, found `&&bool`
|
2021-12-04 22:51:36 -06:00
|
|
|
|
|
|
|
|
help: consider removing the `&&`
|
|
|
|
|
|
|
|
|
LL - while let Range { start: true, end } = t..&&false {}
|
|
|
|
LL + while let Range { start: true, end } = t..false {}
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:282:11
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
2023-01-02 20:00:33 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:220:23
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | while let 0 = 0? {}
|
|
|
|
| ^^ the `?` operator cannot be applied to type `{integer}`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Try` is not implemented for `{integer}`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0614]: type `bool` cannot be dereferenced
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:311:5
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | *let 0 = 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `bool`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:315:5
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | -let 0 = 0;
|
|
|
|
| ^^^^^^^^^^ cannot apply unary operator `-`
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:325:5
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Try` is not implemented for `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2021-04-17 13:56:07 -05:00
|
|
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:325:16
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2022-09-01 14:52:39 -05:00
|
|
|
LL | fn outside_if_and_while_expr() {
|
|
|
|
| ------------------------------ this function should return `Result` or `Option` to accept `?`
|
|
|
|
...
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^ cannot use the `?` operator in a function that returns `()`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
2021-04-17 13:56:07 -05:00
|
|
|
= help: the trait `FromResidual<_>` is not implemented for `()`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:356:10
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | (let Range { start: _, end: _ } = true..true || false);
|
2019-12-30 00:02:24 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
| |
|
2023-01-02 20:00:33 -06:00
|
|
|
| expected `bool`, found `Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 16:16:56 -06:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:379:5
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | fn outside_if_and_while_expr() {
|
|
|
|
| - help: try adding a return type: `-> &bool`
|
|
|
|
...
|
|
|
|
LL | &let 0 = 0
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^^^^^^^^^ expected `()`, found `&bool`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2022-08-20 13:40:08 -05:00
|
|
|
--> $DIR/disallowed-positions.rs:321:17
|
2019-06-17 00:38:26 -05:00
|
|
|
|
|
|
|
|
LL | let 0 = 0?;
|
|
|
|
| ^^ the `?` operator cannot be applied to type `{integer}`
|
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: the trait `Try` is not implemented for `{integer}`
|
2019-06-17 00:38:26 -05:00
|
|
|
|
2022-08-20 13:40:08 -05:00
|
|
|
error: aborting due to 215 previous errors
|
2019-05-11 08:06:36 -05:00
|
|
|
|
2020-05-21 14:49:38 -05:00
|
|
|
Some errors have detailed explanations: E0277, E0308, E0600, E0614.
|
2019-11-09 11:29:57 -06:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|