summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr')
-rw-r--r--tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr1462
1 files changed, 282 insertions, 1180 deletions
diff --git a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr
index 81933173c..ab58abf4d 100644
--- a/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr
+++ b/tests/ui/rfcs/rfc-2497-if-let-chains/disallowed-positions.stderr
@@ -2,503 +2,6 @@ error: expected expression, found `let` statement
--> $DIR/disallowed-positions.rs:29:9
|
LL | if (let 0 = 1) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:33:11
- |
-LL | if (((let 0 = 1))) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:37:9
- |
-LL | if (let 0 = 1) && true {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:41: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) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:45:24
- |
-LL | if (let 0 = 1) && (let 0 = 1) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:51: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:51:48
- |
-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:51:61
- |
-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:61:12
- |
-LL | while (let 0 = 1) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:65:14
- |
-LL | while (((let 0 = 1))) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:69:12
- |
-LL | while (let 0 = 1) && true {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:73:20
- |
-LL | while true && (let 0 = 1) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:77:12
- |
-LL | while (let 0 = 1) && (let 0 = 1) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:77:27
- |
-LL | while (let 0 = 1) && (let 0 = 1) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:83: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:83:51
- |
-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:83:64
- |
-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:110:9
- |
-LL | if &let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:115:9
- |
-LL | if !let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:118:9
- |
-LL | if *let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:122:9
- |
-LL | if -let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:132:9
- |
-LL | if (let 0 = 0)? {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:138:16
- |
-LL | if true || let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:141:17
- |
-LL | if (true || let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:144:25
- |
-LL | if true && (true || let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:147:25
- |
-LL | if true || (true && let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:152:12
- |
-LL | if x = let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:157:15
- |
-LL | if true..(let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:161:11
- |
-LL | if ..(let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:165:9
- |
-LL | if (let 0 = 0).. {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:196:19
- |
-LL | if let true = let true = true {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:202:12
- |
-LL | while &let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:207:12
- |
-LL | while !let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:210:12
- |
-LL | while *let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:214:12
- |
-LL | while -let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:224:12
- |
-LL | while (let 0 = 0)? {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:230:19
- |
-LL | while true || let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:233:20
- |
-LL | while (true || let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:236:28
- |
-LL | while true && (true || let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:239:28
- |
-LL | while true || (true && let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:244:15
- |
-LL | while x = let 0 = 0 {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:249:18
- |
-LL | while true..(let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:253:14
- |
-LL | while ..(let 0 = 0) {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:257:12
- |
-LL | while (let 0 = 0).. {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:288:22
- |
-LL | while let true = let true = true {}
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:304:6
- |
-LL | &let 0 = 0;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:308:6
- |
-LL | !let 0 = 0;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:311:6
- |
-LL | *let 0 = 0;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:315:6
- |
-LL | -let 0 = 0;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:325:6
- |
-LL | (let 0 = 0)?;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:331:13
- |
-LL | true || let 0 = 0;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:334:14
- |
-LL | (true || let 0 = 0);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:337:22
- |
-LL | true && (true || let 0 = 0);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:342:9
- |
-LL | x = let 0 = 0;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:346:12
- |
-LL | true..(let 0 = 0);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:349:8
- |
-LL | ..(let 0 = 0);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:352:6
- |
-LL | (let 0 = 0)..;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:356:6
- |
-LL | (let Range { start: _, end: _ } = true..true || false);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:361:6
- |
-LL | (let true = let true = true);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:361:17
- |
-LL | (let true = let true = true);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:368:25
- |
-LL | let x = true && let y = 1;
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:374:19
- |
-LL | [1, 2, 3][let _ = ()]
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:379:6
- |
-LL | &let 0 = 0
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:391:17
- |
-LL | true && let 1 = 1
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:397:17
- |
-LL | true && let 1 = 1
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:403:17
- |
-LL | true && let 1 = 1
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:415:17
- |
-LL | true && let 1 = 1
- | ^^^
-
-error: expressions must be enclosed in braces to be used as const generic arguments
- --> $DIR/disallowed-positions.rs:415: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:425:9
- |
-LL | if (let Some(a) = opt && true) {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:430:9
- |
-LL | if (let Some(a) = opt) && true {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:434:9
- |
-LL | if (let Some(a) = opt) && (let Some(b) = a) {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:434:32
- |
-LL | if (let Some(a) = opt) && (let Some(b) = a) {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:443:9
- |
-LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:443:31
- |
-LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:449:9
- |
-LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:449:31
- |
-LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:455:9
- |
-LL | if (let Some(a) = opt && (true)) && true {
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:472:22
- |
-LL | let x = (true && let y = 1);
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:477:20
- |
-LL | ([1, 2, 3][let _ = ()])
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:99:16
- |
-LL | use_expr!((let 0 = 1 && 0 == 0));
- | ^^^
-
-error: expected expression, found `let` statement
- --> $DIR/disallowed-positions.rs:103:16
- |
-LL | use_expr!((let 0 = 1));
- | ^^^
-
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:29:9
- |
-LL | if (let 0 = 1) {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
@@ -508,1012 +11,863 @@ note: `let`s wrapped in parentheses are not supported in a context with let chai
LL | if (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:33:11
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:32: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:33:11
+ --> $DIR/disallowed-positions.rs:32:11
|
LL | if (((let 0 = 1))) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:37:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:35:9
|
LL | if (let 0 = 1) && true {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
- --> $DIR/disallowed-positions.rs:37:9
+ --> $DIR/disallowed-positions.rs:35:9
|
LL | if (let 0 = 1) && true {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:41:17
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:38: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:41:17
+ --> $DIR/disallowed-positions.rs:38:17
|
LL | if true && (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:45:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:41: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
+ --> $DIR/disallowed-positions.rs:41:9
|
LL | if (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:45:24
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:41: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
+ --> $DIR/disallowed-positions.rs:41:24
|
LL | if (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:51:35
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:45: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:51:35
+ --> $DIR/disallowed-positions.rs:45:35
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:51:48
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:45: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:51:35
+ --> $DIR/disallowed-positions.rs:45:35
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:51:61
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:45: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:51:35
+ --> $DIR/disallowed-positions.rs:45:35
|
LL | if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:61:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:52: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:61:12
+ --> $DIR/disallowed-positions.rs:52:12
|
LL | while (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:65:14
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:55: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:65:14
+ --> $DIR/disallowed-positions.rs:55:14
|
LL | while (((let 0 = 1))) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:69:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:58: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:69:12
+ --> $DIR/disallowed-positions.rs:58:12
|
LL | while (let 0 = 1) && true {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:73:20
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:61: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:73:20
+ --> $DIR/disallowed-positions.rs:61:20
|
LL | while true && (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:77:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:64: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:77:12
+ --> $DIR/disallowed-positions.rs:64:12
|
LL | while (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:77:27
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:64: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:77:27
+ --> $DIR/disallowed-positions.rs:64:27
|
LL | while (let 0 = 1) && (let 0 = 1) {}
| ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:83:38
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:68: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:83:38
+ --> $DIR/disallowed-positions.rs:68:38
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:83:51
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:68: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:83:38
+ --> $DIR/disallowed-positions.rs:68:38
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:83:64
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:68: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:83:38
+ --> $DIR/disallowed-positions.rs:68:38
|
LL | while let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:99:16
- |
-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
- --> $DIR/disallowed-positions.rs:99:16
- |
-LL | use_expr!((let 0 = 1 && 0 == 0));
- | ^^^^^^^^^^^^^^^^^^^
-
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:99:16
- |
-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
- --> $DIR/disallowed-positions.rs:99:16
- |
-LL | use_expr!((let 0 = 1 && 0 == 0));
- | ^^^^^^^^^^^^^^^^^^^
-
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:103:16
- |
-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
- --> $DIR/disallowed-positions.rs:103:16
- |
-LL | use_expr!((let 0 = 1));
- | ^^^^^^^^^
-
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:103:16
- |
-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
- --> $DIR/disallowed-positions.rs:103:16
- |
-LL | use_expr!((let 0 = 1));
- | ^^^^^^^^^
-
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:110:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:88:9
|
LL | if &let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:115:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:91:9
|
LL | if !let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:118:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:93:9
|
LL | if *let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:122:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:95:9
|
LL | if -let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:132:9
+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
-note: `let`s wrapped in parentheses are not supported in a context with let chains
- --> $DIR/disallowed-positions.rs:132:9
- |
-LL | if (let 0 = 0)? {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:138:16
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:106:16
|
LL | if true || let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:138:13
+ --> $DIR/disallowed-positions.rs:106:13
|
LL | if true || let 0 = 0 {}
| ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:141:17
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:108:17
|
LL | if (true || let 0 = 0) {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:141:14
- |
-LL | if (true || let 0 = 0) {}
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:144:25
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:110:25
|
LL | if true && (true || let 0 = 0) {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:144:22
- |
-LL | if true && (true || let 0 = 0) {}
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:147:25
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:112:25
|
LL | if true || (true && let 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
- --> $DIR/disallowed-positions.rs:147:17
- |
-LL | if true || (true && let 0 = 0) {}
- | ^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:152:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:116:12
|
LL | if x = let 0 = 0 {}
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:157:15
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:119:15
|
LL | if true..(let 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
- --> $DIR/disallowed-positions.rs:157:15
- |
-LL | if true..(let 0 = 0) {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:161:11
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:122:11
|
LL | if ..(let 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
- --> $DIR/disallowed-positions.rs:161:11
- |
-LL | if ..(let 0 = 0) {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:165:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:124:9
|
LL | if (let 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
- --> $DIR/disallowed-positions.rs:165:9
- |
-LL | if (let 0 = 0).. {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:171:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:128:8
|
LL | if let Range { start: _, end: _ } = true..true && false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:175:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:131:8
|
LL | if let Range { start: _, end: _ } = true..true || false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:182:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:137:8
|
LL | if let Range { start: F, end } = F..|| true {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:190:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:143:8
|
LL | if let Range { start: true, end } = t..&&false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:196:19
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:147:19
|
LL | if let true = let true = true {}
- | ^^^^^^^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:202:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:152:12
|
LL | while &let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:207:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:155:12
|
LL | while !let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:210:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:157:12
|
LL | while *let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:214:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:159:12
|
LL | while -let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:224:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:167:12
|
LL | while (let 0 = 0)? {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `let`s wrapped in parentheses are not supported in a context with let chains
- --> $DIR/disallowed-positions.rs:224:12
- |
-LL | while (let 0 = 0)? {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:230:19
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:170:19
|
LL | while true || let 0 = 0 {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:230:16
+ --> $DIR/disallowed-positions.rs:170:16
|
LL | while true || let 0 = 0 {}
| ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:233:20
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:172:20
|
LL | while (true || let 0 = 0) {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:233:17
- |
-LL | while (true || let 0 = 0) {}
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:236:28
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:174:28
|
LL | while true && (true || let 0 = 0) {}
| ^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:236:25
- |
-LL | while true && (true || let 0 = 0) {}
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:239:28
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:176:28
|
LL | while true || (true && let 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
- --> $DIR/disallowed-positions.rs:239:20
- |
-LL | while true || (true && let 0 = 0) {}
- | ^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:244:15
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:180:15
|
LL | while x = let 0 = 0 {}
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:249:18
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:183:18
|
LL | while true..(let 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
- --> $DIR/disallowed-positions.rs:249:18
- |
-LL | while true..(let 0 = 0) {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:253:14
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:186:14
|
LL | while ..(let 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
- --> $DIR/disallowed-positions.rs:253:14
- |
-LL | while ..(let 0 = 0) {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:257:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:188:12
|
LL | while (let 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
- --> $DIR/disallowed-positions.rs:257:12
- |
-LL | while (let 0 = 0).. {}
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:263:11
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:192:11
|
LL | while let Range { start: _, end: _ } = true..true && false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:267:11
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:195:11
|
LL | while let Range { start: _, end: _ } = true..true || false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:274:11
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:201:11
|
LL | while let Range { start: F, end } = F..|| true {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:282:11
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:207:11
|
LL | while let Range { start: true, end } = t..&&false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:288:22
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:211:22
|
LL | while let true = let true = true {}
- | ^^^^^^^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:304:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:226:6
|
LL | &let 0 = 0;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:308:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:229:6
|
LL | !let 0 = 0;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:311:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:231:6
|
LL | *let 0 = 0;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:315:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:233:6
|
LL | -let 0 = 0;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:325:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:241:6
|
LL | (let 0 = 0)?;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `let`s wrapped in parentheses are not supported in a context with let chains
- --> $DIR/disallowed-positions.rs:325:6
- |
-LL | (let 0 = 0)?;
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:331:13
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:244:13
|
LL | true || let 0 = 0;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:331:10
- |
-LL | true || let 0 = 0;
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:334:14
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:246:14
|
LL | (true || let 0 = 0);
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:334:11
- |
-LL | (true || let 0 = 0);
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:337:22
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:248:22
|
LL | true && (true || let 0 = 0);
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-note: `||` operators are not supported in let chain expressions
- --> $DIR/disallowed-positions.rs:337:19
- |
-LL | true && (true || let 0 = 0);
- | ^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:342:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:252:9
|
LL | x = let 0 = 0;
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:346:12
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:255:12
|
LL | true..(let 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
- --> $DIR/disallowed-positions.rs:346:12
- |
-LL | true..(let 0 = 0);
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:349:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:257:8
|
LL | ..(let 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
- --> $DIR/disallowed-positions.rs:349:8
- |
-LL | ..(let 0 = 0);
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:352:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:259:6
|
LL | (let 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
- --> $DIR/disallowed-positions.rs:352:6
- |
-LL | (let 0 = 0)..;
- | ^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:356:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:262:6
|
LL | (let Range { start: _, end: _ } = true..true || false);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:361:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:266:6
|
LL | (let true = let 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:361:6
+
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:266: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:272: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:278:19
+ |
+LL | [1, 2, 3][let _ = ()]
+ | ^^^
+ |
+ = note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:379:6
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:283:6
|
LL | &let 0 = 0
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:391:17
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:293:17
|
LL | true && let 1 = 1
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:397:17
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:298:17
|
LL | true && let 1 = 1
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:403:17
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:303:17
|
LL | true && let 1 = 1
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:415:17
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:314:17
|
LL | true && let 1 = 1
- | ^^^^^^^^^
+ | ^^^
|
= note: only supported directly in conditions of `if` and `while` expressions
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:425:9
+error: expressions must be enclosed in braces to be used as const generic arguments
+ --> $DIR/disallowed-positions.rs:314: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:323: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:425:9
+ --> $DIR/disallowed-positions.rs:323:9
|
LL | if (let Some(a) = opt && true) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:430:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:327: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:430:9
+ --> $DIR/disallowed-positions.rs:327:9
|
LL | if (let Some(a) = opt) && true {
| ^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:434:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:330: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:434:9
+ --> $DIR/disallowed-positions.rs:330:9
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
| ^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:434:32
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:330: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:434:32
+ --> $DIR/disallowed-positions.rs:330:32
|
LL | if (let Some(a) = opt) && (let Some(b) = a) {
| ^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:443:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:337: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:443:9
+ --> $DIR/disallowed-positions.rs:337:9
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:443:31
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:337: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:443:31
+ --> $DIR/disallowed-positions.rs:337:31
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && b == 1 {
| ^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:449:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:341: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:449:9
+ --> $DIR/disallowed-positions.rs:341:9
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:449:31
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:341: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:449:31
+ --> $DIR/disallowed-positions.rs:341:31
|
LL | if (let Some(a) = opt && (let Some(b) = a)) && true {
| ^^^^^^^^^^^^^^^
-error: `let` expressions are not supported here
- --> $DIR/disallowed-positions.rs:455:9
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:345: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:455:9
+ --> $DIR/disallowed-positions.rs:345:9
|
LL | if (let Some(a) = opt && (true)) && true {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:110:8
- |
-LL | if &let 0 = 0 {}
- | ^^^^^^^^^^ expected `bool`, found `&bool`
- |
-help: consider removing the borrow
- |
-LL - if &let 0 = 0 {}
-LL + if let 0 = 0 {}
- |
-
-error[E0614]: type `bool` cannot be dereferenced
- --> $DIR/disallowed-positions.rs:118:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:361:22
|
-LL | if *let 0 = 0 {}
- | ^^^^^^^^^^
-
-error[E0600]: cannot apply unary operator `-` to type `bool`
- --> $DIR/disallowed-positions.rs:122:8
+LL | let x = (true && let y = 1);
+ | ^^^
|
-LL | if -let 0 = 0 {}
- | ^^^^^^^^^^ cannot apply unary operator `-`
+ = note: only supported directly in conditions of `if` and `while` expressions
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
- --> $DIR/disallowed-positions.rs:132:8
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:366:20
|
-LL | if (let 0 = 0)? {}
- | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
+LL | ([1, 2, 3][let _ = ()])
+ | ^^^
|
- = help: the trait `Try` is not implemented for `bool`
+ = note: only supported directly in conditions of `if` and `while` expressions
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
- --> $DIR/disallowed-positions.rs:132:19
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:81:16
|
-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 `()`
+LL | use_expr!((let 0 = 1 && 0 == 0));
+ | ^^^
|
- = help: the trait `FromResidual<_>` is not implemented for `()`
+ = note: only supported directly in conditions of `if` and `while` expressions
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:152:8
- |
-LL | if x = let 0 = 0 {}
- | ^^^^^^^^^^^^^ expected `bool`, found `()`
+error: expected expression, found `let` statement
+ --> $DIR/disallowed-positions.rs:83:16
|
-help: you might have meant to compare for equality
+LL | use_expr!((let 0 = 1));
+ | ^^^
|
-LL | if x == let 0 = 0 {}
- | +
+ = note: only supported directly in conditions of `if` and `while` expressions
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:157:8
+ --> $DIR/disallowed-positions.rs:119:8
|
LL | if true..(let 0 = 0) {}
| ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
@@ -1522,25 +876,7 @@ LL | if true..(let 0 = 0) {}
found struct `std::ops::Range<bool>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:161:8
- |
-LL | if ..(let 0 = 0) {}
- | ^^^^^^^^^^^^^ expected `bool`, found `RangeTo<bool>`
- |
- = note: expected type `bool`
- found struct `RangeTo<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:165:8
- |
-LL | if (let 0 = 0).. {}
- | ^^^^^^^^^^^^^ expected `bool`, found `RangeFrom<bool>`
- |
- = note: expected type `bool`
- found struct `RangeFrom<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:171:12
+ --> $DIR/disallowed-positions.rs:128:12
|
LL | if let Range { start: _, end: _ } = true..true && false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
@@ -1551,16 +887,7 @@ LL | if let Range { start: _, end: _ } = true..true && false {}
found struct `std::ops::Range<_>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:171:8
- |
-LL | if let Range { start: _, end: _ } = true..true && false {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:175:12
+ --> $DIR/disallowed-positions.rs:131:12
|
LL | if let Range { start: _, end: _ } = true..true || false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
@@ -1571,16 +898,7 @@ LL | if let Range { start: _, end: _ } = true..true || false {}
found struct `std::ops::Range<_>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:175:8
- |
-LL | if let Range { start: _, end: _ } = true..true || false {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:182:12
+ --> $DIR/disallowed-positions.rs:137:12
|
LL | if let Range { start: F, end } = F..|| true {}
| ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool`
@@ -1591,29 +909,7 @@ LL | if let Range { start: F, end } = F..|| true {}
found struct `std::ops::Range<_>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:182:41
- |
-LL | if let Range { start: F, end } = F..|| true {}
- | ^^^^^^^ expected `bool`, found closure
- |
- = note: expected type `bool`
- found closure `[closure@$DIR/disallowed-positions.rs:182:41: 182:43]`
-help: use parentheses to call this closure
- |
-LL | if let Range { start: F, end } = F..(|| true)() {}
- | + +++
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:182:8
- |
-LL | if let Range { start: F, end } = F..|| true {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:190:12
+ --> $DIR/disallowed-positions.rs:143:12
|
LL | if let Range { start: true, end } = t..&&false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool`
@@ -1623,29 +919,8 @@ LL | if let Range { start: true, end } = t..&&false {}
= note: expected type `bool`
found struct `std::ops::Range<_>`
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:190:44
- |
-LL | if let Range { start: true, end } = t..&&false {}
- | ^^^^^^^ expected `bool`, found `&&bool`
- |
-help: consider removing the `&&`
- |
-LL - if let Range { start: true, end } = t..&&false {}
-LL + if let Range { start: true, end } = t..false {}
- |
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:190:8
- |
-LL | if let Range { start: true, end } = t..&&false {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
error[E0277]: the `?` operator can only be applied to values that implement `Try`
- --> $DIR/disallowed-positions.rs:128:20
+ --> $DIR/disallowed-positions.rs:99:20
|
LL | if let 0 = 0? {}
| ^^ the `?` operator cannot be applied to type `{integer}`
@@ -1653,61 +928,7 @@ LL | if let 0 = 0? {}
= help: the trait `Try` is not implemented for `{integer}`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:202:11
- |
-LL | while &let 0 = 0 {}
- | ^^^^^^^^^^ expected `bool`, found `&bool`
- |
-help: consider removing the borrow
- |
-LL - while &let 0 = 0 {}
-LL + while let 0 = 0 {}
- |
-
-error[E0614]: type `bool` cannot be dereferenced
- --> $DIR/disallowed-positions.rs:210:11
- |
-LL | while *let 0 = 0 {}
- | ^^^^^^^^^^
-
-error[E0600]: cannot apply unary operator `-` to type `bool`
- --> $DIR/disallowed-positions.rs:214:11
- |
-LL | while -let 0 = 0 {}
- | ^^^^^^^^^^ cannot apply unary operator `-`
-
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
- --> $DIR/disallowed-positions.rs:224:11
- |
-LL | while (let 0 = 0)? {}
- | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
- |
- = help: the trait `Try` is not implemented for `bool`
-
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
- --> $DIR/disallowed-positions.rs:224:22
- |
-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 `()`
- |
- = help: the trait `FromResidual<_>` is not implemented for `()`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:244:11
- |
-LL | while x = let 0 = 0 {}
- | ^^^^^^^^^^^^^ expected `bool`, found `()`
- |
-help: you might have meant to compare for equality
- |
-LL | while x == let 0 = 0 {}
- | +
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:249:11
+ --> $DIR/disallowed-positions.rs:183:11
|
LL | while true..(let 0 = 0) {}
| ^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
@@ -1716,25 +937,7 @@ LL | while true..(let 0 = 0) {}
found struct `std::ops::Range<bool>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:253:11
- |
-LL | while ..(let 0 = 0) {}
- | ^^^^^^^^^^^^^ expected `bool`, found `RangeTo<bool>`
- |
- = note: expected type `bool`
- found struct `RangeTo<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:257:11
- |
-LL | while (let 0 = 0).. {}
- | ^^^^^^^^^^^^^ expected `bool`, found `RangeFrom<bool>`
- |
- = note: expected type `bool`
- found struct `RangeFrom<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:263:15
+ --> $DIR/disallowed-positions.rs:192:15
|
LL | while let Range { start: _, end: _ } = true..true && false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
@@ -1745,16 +948,7 @@ LL | while let Range { start: _, end: _ } = true..true && false {}
found struct `std::ops::Range<_>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:263:11
- |
-LL | while let Range { start: _, end: _ } = true..true && false {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:267:15
+ --> $DIR/disallowed-positions.rs:195:15
|
LL | while let Range { start: _, end: _ } = true..true || false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
@@ -1765,16 +959,7 @@ LL | while let Range { start: _, end: _ } = true..true || false {}
found struct `std::ops::Range<_>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:267:11
- |
-LL | while let Range { start: _, end: _ } = true..true || false {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:274:15
+ --> $DIR/disallowed-positions.rs:201:15
|
LL | while let Range { start: F, end } = F..|| true {}
| ^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `fn() -> bool`
@@ -1785,29 +970,7 @@ LL | while let Range { start: F, end } = F..|| true {}
found struct `std::ops::Range<_>`
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:274:44
- |
-LL | while let Range { start: F, end } = F..|| true {}
- | ^^^^^^^ expected `bool`, found closure
- |
- = note: expected type `bool`
- found closure `[closure@$DIR/disallowed-positions.rs:274:44: 274:46]`
-help: use parentheses to call this closure
- |
-LL | while let Range { start: F, end } = F..(|| true)() {}
- | + +++
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:274:11
- |
-LL | while let Range { start: F, end } = F..|| true {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:282:15
+ --> $DIR/disallowed-positions.rs:207:15
|
LL | while let Range { start: true, end } = t..&&false {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool`
@@ -1817,68 +980,16 @@ LL | while let Range { start: true, end } = t..&&false {}
= note: expected type `bool`
found struct `std::ops::Range<_>`
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:282:47
- |
-LL | while let Range { start: true, end } = t..&&false {}
- | ^^^^^^^ expected `bool`, found `&&bool`
- |
-help: consider removing the `&&`
- |
-LL - while let Range { start: true, end } = t..&&false {}
-LL + while let Range { start: true, end } = t..false {}
- |
-
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:282:11
- |
-LL | while let Range { start: true, end } = t..&&false {}
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found `Range<bool>`
- |
- = note: expected type `bool`
- found struct `std::ops::Range<bool>`
-
error[E0277]: the `?` operator can only be applied to values that implement `Try`
- --> $DIR/disallowed-positions.rs:220:23
+ --> $DIR/disallowed-positions.rs:163:23
|
LL | while let 0 = 0? {}
| ^^ the `?` operator cannot be applied to type `{integer}`
|
= help: the trait `Try` is not implemented for `{integer}`
-error[E0614]: type `bool` cannot be dereferenced
- --> $DIR/disallowed-positions.rs:311:5
- |
-LL | *let 0 = 0;
- | ^^^^^^^^^^
-
-error[E0600]: cannot apply unary operator `-` to type `bool`
- --> $DIR/disallowed-positions.rs:315:5
- |
-LL | -let 0 = 0;
- | ^^^^^^^^^^ cannot apply unary operator `-`
-
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
- --> $DIR/disallowed-positions.rs:325:5
- |
-LL | (let 0 = 0)?;
- | ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
- |
- = help: the trait `Try` is not implemented for `bool`
-
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
- --> $DIR/disallowed-positions.rs:325:16
- |
-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 `()`
- |
- = help: the trait `FromResidual<_>` is not implemented for `()`
-
error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:356:10
+ --> $DIR/disallowed-positions.rs:262:10
|
LL | (let Range { start: _, end: _ } = true..true || false);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
@@ -1888,24 +999,15 @@ LL | (let Range { start: _, end: _ } = true..true || false);
= note: expected type `bool`
found struct `std::ops::Range<_>`
-error[E0308]: mismatched types
- --> $DIR/disallowed-positions.rs:379:5
- |
-LL | fn outside_if_and_while_expr() {
- | - help: try adding a return type: `-> &bool`
-...
-LL | &let 0 = 0
- | ^^^^^^^^^^ expected `()`, found `&bool`
-
error[E0277]: the `?` operator can only be applied to values that implement `Try`
- --> $DIR/disallowed-positions.rs:321:17
+ --> $DIR/disallowed-positions.rs:237: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 215 previous errors
+error: aborting due to 104 previous errors
-Some errors have detailed explanations: E0277, E0308, E0600, E0614.
+Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.