2020-10-03 18:30:32 +00:00
|
|
|
error: expressions must be enclosed in braces to be used as const generic arguments
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:233:9
|
2019-05-21 04:50:53 +00:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
2020-10-03 18:30:32 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: enclose the `const` expression in braces
|
|
|
|
|
|
|
|
|
LL | { true && let 1 = 1 }
|
2021-06-22 02:07:19 +00:00
|
|
|
| + +
|
2019-05-21 04:50:53 +00:00
|
|
|
|
2019-05-11 13:06:36 +00:00
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:30:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if &let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:33:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if !let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:34:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:36:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:44:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:48:16
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if true || let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:49:17
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:50:25
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if true && (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:51:25
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if true || (true && let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:54:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if x = let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:57:15
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if true..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:59:11
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if ..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:61:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0).. {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:65:8
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true && false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:69:8
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true || false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:76:8
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:84:8
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:90:19
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if let true = let true = true {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:94:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while &let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:97:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while !let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:98:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:100:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:108:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:112:19
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while true || let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:113:20
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:114:28
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while true && (true || let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:115:28
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while true || (true && let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:118:15
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while x = let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:121:18
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while true..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:123:14
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while ..(let 0 = 0) {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:125:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0).. {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:129:11
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true && false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:133:11
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true || false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:140:11
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:148:11
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:154:22
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | while let true = let true = true {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:168:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | &let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:170:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | !let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:171:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | *let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:173:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | -let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:181:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:185:13
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | true || let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:186:14
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | (true || let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:187:22
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | true && (true || let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:190:9
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | x = let 0 = 0;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:192:12
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | true..(let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:193:8
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | ..(let 0 = 0);
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:194:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)..;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:196:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | (let Range { start: _, end: _ } = true..true || false);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:200:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | (let true = let true = true);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:204:6
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | &let 0 = 0
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-11 13:06:36 +00:00
|
|
|
|
2019-05-21 04:50:53 +00:00
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:215:17
|
2019-05-21 04:50:53 +00:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-21 04:50:53 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:219:17
|
2019-05-21 04:50:53 +00:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-21 04:50:53 +00:00
|
|
|
|
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:223:17
|
2019-05-21 04:50:53 +00:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2019-05-21 04:50:53 +00:00
|
|
|
|
2020-10-03 18:30:32 +00:00
|
|
|
error: `let` expressions are not supported here
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:233:17
|
2020-10-03 18:30:32 +00:00
|
|
|
|
|
|
|
|
LL | true && let 1 = 1
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2021-08-08 14:49:13 +00:00
|
|
|
= note: only supported directly in conditions of `if`- and `while`-expressions
|
2021-10-17 10:04:01 +00:00
|
|
|
= note: as well as when nested within `&&` and parentheses in those conditions
|
2020-10-03 18:30:32 +00:00
|
|
|
|
2020-04-22 08:21:32 +00:00
|
|
|
warning: the feature `let_chains` is incomplete and may not be safe to use and/or cause compiler crashes
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:20:12
|
2019-07-29 00:01:57 +00:00
|
|
|
|
|
|
|
|
LL | #![feature(let_chains)] // Avoid inflating `.stderr` with overzealous gates in this test.
|
|
|
|
| ^^^^^^^^^^
|
2020-04-22 08:21:32 +00:00
|
|
|
|
|
2021-08-27 16:04:57 +00:00
|
|
|
= note: `#[warn(incomplete_features)]` on by default
|
2020-04-22 08:21:32 +00:00
|
|
|
= note: see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
|
2019-07-29 00:01:57 +00:00
|
|
|
|
2019-06-17 05:38:26 +00:00
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:30:8
|
2019-05-11 13:06:36 +00:00
|
|
|
|
|
|
|
|
LL | if &let 0 = 0 {}
|
2021-06-28 18:22:47 +00:00
|
|
|
| ^^^^^^^^^^ expected `bool`, found `&bool`
|
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
2021-06-22 02:07:19 +00:00
|
|
|
LL - if &let 0 = 0 {}
|
|
|
|
LL + if let 0 = 0 {}
|
|
|
|
|
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0614]: type `bool` cannot be dereferenced
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:34:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `bool`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:36:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^ cannot apply unary operator `-`
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:44:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Try` is not implemented for `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2021-04-17 18:56:07 +00:00
|
|
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:44:19
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
2019-11-24 21:29:40 +00:00
|
|
|
LL | / fn nested_within_if_expr() {
|
|
|
|
LL | | if &let 0 = 0 {}
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
... |
|
|
|
|
LL | | if (let 0 = 0)? {}
|
2021-04-17 18:56:07 +00:00
|
|
|
| | ^ cannot use the `?` operator in a function that returns `()`
|
2019-11-24 21:29:40 +00:00
|
|
|
... |
|
|
|
|
LL | | if let true = let true = true {}
|
|
|
|
LL | | }
|
|
|
|
| |_- this function should return `Result` or `Option` to accept `?`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
2021-04-17 18:56:07 +00:00
|
|
|
= help: the trait `FromResidual<_>` is not implemented for `()`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:54:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if x = let 0 = 0 {}
|
2020-08-26 03:28:25 +00:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
|
|
|
|
|
help: you might have meant to compare for equality
|
|
|
|
|
|
|
|
|
LL | if x == let 0 = 0 {}
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:57:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if true..(let 0 = 0) {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:59:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if ..(let 0 = 0) {}
|
2020-09-02 07:40:56 +00:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 07:40:56 +00:00
|
|
|
found struct `RangeTo<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:61:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if (let 0 = 0).. {}
|
2020-09-02 07:40:56 +00:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 07:40:56 +00:00
|
|
|
found struct `RangeFrom<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:65:12
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true && false {}
|
2019-12-30 06:02:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:65:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true && false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:69:12
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true || false {}
|
2019-12-30 06:02:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:69:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: _, end: _ } = true..true || false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:76:12
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range`
|
|
|
|
|
|
2019-11-13 22:16:56 +00:00
|
|
|
= note: expected fn pointer `fn() -> bool`
|
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:76:41
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^ expected `bool`, found closure
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2021-08-27 16:04:57 +00:00
|
|
|
found closure `[closure@$DIR/disallowed-positions.rs:76:41: 76:48]`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:76:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: F, end } = F..|| true {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:84:12
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
2019-12-30 08:08:18 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:84:44
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^ expected `bool`, found `&&bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:84:8
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let Range { start: true, end } = t..&&false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:40:20
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | if let 0 = 0? {}
|
|
|
|
| ^^ the `?` operator cannot be applied to type `{integer}`
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Try` is not implemented for `{integer}`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:94:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while &let 0 = 0 {}
|
2021-06-28 18:22:47 +00:00
|
|
|
| ^^^^^^^^^^ expected `bool`, found `&bool`
|
|
|
|
|
|
|
|
|
help: consider removing the borrow
|
|
|
|
|
|
2021-06-22 02:07:19 +00:00
|
|
|
LL - while &let 0 = 0 {}
|
|
|
|
LL + while let 0 = 0 {}
|
|
|
|
|
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0614]: type `bool` cannot be dereferenced
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:98:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while *let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `bool`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:100:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while -let 0 = 0 {}
|
|
|
|
| ^^^^^^^^^^ cannot apply unary operator `-`
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:108:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0)? {}
|
|
|
|
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Try` is not implemented for `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2021-04-17 18:56:07 +00:00
|
|
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:108:22
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
2019-11-24 21:29:40 +00:00
|
|
|
LL | / fn nested_within_while_expr() {
|
|
|
|
LL | | while &let 0 = 0 {}
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
... |
|
|
|
|
LL | | while (let 0 = 0)? {}
|
2021-04-17 18:56:07 +00:00
|
|
|
| | ^ cannot use the `?` operator in a function that returns `()`
|
2019-11-24 21:29:40 +00:00
|
|
|
... |
|
|
|
|
LL | | while let true = let true = true {}
|
|
|
|
LL | | }
|
|
|
|
| |_- this function should return `Result` or `Option` to accept `?`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
2021-04-17 18:56:07 +00:00
|
|
|
= help: the trait `FromResidual<_>` is not implemented for `()`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:118:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while x = let 0 = 0 {}
|
2020-08-26 03:28:25 +00:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found `()`
|
|
|
|
|
|
|
|
|
help: you might have meant to compare for equality
|
|
|
|
|
|
|
|
|
LL | while x == let 0 = 0 {}
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:121:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while true..(let 0 = 0) {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:123:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while ..(let 0 = 0) {}
|
2020-09-02 07:40:56 +00:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found struct `RangeTo`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 07:40:56 +00:00
|
|
|
found struct `RangeTo<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:125:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while (let 0 = 0).. {}
|
2020-09-02 07:40:56 +00:00
|
|
|
| ^^^^^^^^^^^^^ expected `bool`, found struct `RangeFrom`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2020-09-02 07:40:56 +00:00
|
|
|
found struct `RangeFrom<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:129:15
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true && false {}
|
2019-12-30 06:02:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:129:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true && false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:133:15
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true || false {}
|
2019-12-30 06:02:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:133:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: _, end: _ } = true..true || false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:140:15
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ expected fn pointer, found struct `std::ops::Range`
|
|
|
|
|
|
2019-11-13 22:16:56 +00:00
|
|
|
= note: expected fn pointer `fn() -> bool`
|
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:140:44
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^ expected `bool`, found closure
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2021-08-27 16:04:57 +00:00
|
|
|
found closure `[closure@$DIR/disallowed-positions.rs:140:44: 140:51]`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:140:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: F, end } = F..|| true {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:148:15
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
2019-12-30 08:08:18 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ - this expression has type `&&bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:148:47
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^ expected `bool`, found `&&bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:148:11
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let Range { start: true, end } = t..&&false {}
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<bool>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:104:23
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | while let 0 = 0? {}
|
|
|
|
| ^^ the `?` operator cannot be applied to type `{integer}`
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Try` is not implemented for `{integer}`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0614]: type `bool` cannot be dereferenced
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:171:5
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | *let 0 = 0;
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `-` to type `bool`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:173:5
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | -let 0 = 0;
|
|
|
|
| ^^^^^^^^^^ cannot apply unary operator `-`
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:181:5
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | (let 0 = 0)?;
|
|
|
|
| ^^^^^^^^^^^^ the `?` operator cannot be applied to type `bool`
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Try` is not implemented for `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2021-04-17 18:56:07 +00:00
|
|
|
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:181:16
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
2019-11-24 21:29:40 +00:00
|
|
|
LL | / fn outside_if_and_while_expr() {
|
|
|
|
LL | | &let 0 = 0;
|
|
|
|
LL | |
|
|
|
|
LL | | !let 0 = 0;
|
|
|
|
... |
|
|
|
|
LL | | (let 0 = 0)?;
|
2021-04-17 18:56:07 +00:00
|
|
|
| | ^ cannot use the `?` operator in a function that returns `()`
|
2019-11-24 21:29:40 +00:00
|
|
|
... |
|
|
|
|
LL | |
|
|
|
|
LL | | }
|
|
|
|
| |_- this function should return `Result` or `Option` to accept `?`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
2021-04-17 18:56:07 +00:00
|
|
|
= help: the trait `FromResidual<_>` is not implemented for `()`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:196:10
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | (let Range { start: _, end: _ } = true..true || false);
|
2019-12-30 06:02:24 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- this expression has type `bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
| |
|
2019-11-15 17:37:01 +00:00
|
|
|
| expected `bool`, found struct `std::ops::Range`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
= note: expected type `bool`
|
2019-11-13 22:16:56 +00:00
|
|
|
found struct `std::ops::Range<_>`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:204:5
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | fn outside_if_and_while_expr() {
|
|
|
|
| - help: try adding a return type: `-> &bool`
|
|
|
|
...
|
|
|
|
LL | &let 0 = 0
|
2019-11-15 17:37:01 +00:00
|
|
|
| ^^^^^^^^^^ expected `()`, found `&bool`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
error[E0277]: the `?` operator can only be applied to values that implement `Try`
|
2021-08-27 16:04:57 +00:00
|
|
|
--> $DIR/disallowed-positions.rs:177:17
|
2019-06-17 05:38:26 +00:00
|
|
|
|
|
|
|
|
LL | let 0 = 0?;
|
|
|
|
| ^^ the `?` operator cannot be applied to type `{integer}`
|
|
|
|
|
|
2020-09-02 07:40:56 +00:00
|
|
|
= help: the trait `Try` is not implemented for `{integer}`
|
2019-06-17 05:38:26 +00:00
|
|
|
|
2021-08-27 16:04:57 +00:00
|
|
|
error: aborting due to 103 previous errors; 1 warning emitted
|
2019-05-11 13:06:36 +00:00
|
|
|
|
2020-05-21 19:49:38 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0308, E0600, E0614.
|
2019-11-09 17:29:57 +00:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|