1 error: a `&&` expression cannot be directly assigned in `let...else`
2 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:9:19
4 LL | let Some(n) = opt && n == 1 else {
7 help: wrap the expression in parentheses
9 LL | let Some(n) = (opt && n == 1) else {
12 error: a `&&` expression cannot be directly assigned in `let...else`
13 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:15:19
15 LL | let Some(n) = opt && let another = n else {
16 | ^^^^^^^^^^^^^^^^^^^^^^
18 help: wrap the expression in parentheses
20 LL | let Some(n) = (opt && let another = n) else {
23 error: this `if` expression is missing a block after the condition
24 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:23:5
26 LL | if let Some(n) = opt else {
29 help: add a block here
30 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:23:25
32 LL | if let Some(n) = opt else {
35 error: this `if` expression is missing a block after the condition
36 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:27:5
38 LL | if let Some(n) = opt && n == 1 else {
41 help: add a block here
42 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:27:35
44 LL | if let Some(n) = opt && n == 1 else {
47 error: this `if` expression is missing a block after the condition
48 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:31:5
50 LL | if let Some(n) = opt && let another = n else {
53 help: add a block here
54 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:31:44
56 LL | if let Some(n) = opt && let another = n else {
59 error: expected `{`, found keyword `else`
60 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:37:33
62 LL | while let Some(n) = opt else {
63 | ----- ----------------- ^^^^ expected `{`
65 | | this `while` condition successfully parsed
66 | while parsing the body of this `while` expression
68 error: expected `{`, found keyword `else`
69 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:43:43
71 LL | while let Some(n) = opt && n == 1 else {
72 | ----- --------------------------- ^^^^ expected `{`
74 | | this `while` condition successfully parsed
75 | while parsing the body of this `while` expression
77 error: expected `{`, found keyword `else`
78 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:49:52
80 LL | while let Some(n) = opt && let another = n else {
81 | ----- ------------------------------------ ^^^^ expected `{`
83 | | this `while` condition successfully parsed
84 | while parsing the body of this `while` expression
86 error: `let` expressions are not supported here
87 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:15:26
89 LL | let Some(n) = opt && let another = n else {
92 = note: only supported directly in conditions of `if` and `while` expressions
94 error[E0308]: mismatched types
95 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:9:19
97 LL | let Some(n) = opt && n == 1 else {
98 | ^^^ expected `bool`, found enum `Option`
100 = note: expected type `bool`
101 found enum `Option<i32>`
103 error[E0308]: mismatched types
104 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:9:9
106 LL | let Some(n) = opt && n == 1 else {
107 | ^^^^^^^ ------------- this expression has type `bool`
109 | expected `bool`, found enum `Option`
111 = note: expected type `bool`
112 found enum `Option<_>`
114 error[E0308]: mismatched types
115 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:15:19
117 LL | let Some(n) = opt && let another = n else {
118 | ^^^ expected `bool`, found enum `Option`
120 = note: expected type `bool`
121 found enum `Option<i32>`
123 error[E0308]: mismatched types
124 --> $DIR/ensure-that-let-else-does-not-interact-with-let-chains.rs:15:9
126 LL | let Some(n) = opt && let another = n else {
127 | ^^^^^^^ ---------------------- this expression has type `bool`
129 | expected `bool`, found enum `Option`
131 = note: expected type `bool`
132 found enum `Option<_>`
134 error: aborting due to 13 previous errors
136 For more information about this error, try `rustc --explain E0308`.