rust/tests/ui/typeck/issue-112385-while-assign-l...

15 lines
401 B
Plaintext

error[E0308]: mismatched types
--> $DIR/issue-112385-while-assign-lhs-place-expr-ice.rs:7:11
|
LL | while Some(foo) = None {}
| ^^^^^^^^^^^^^^^^ expected `bool`, found `()`
|
help: consider adding `let`
|
LL | while let Some(foo) = None {}
| +++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.