]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/option-to-bool.stderr
Rollup merge of #105380 - BoxyUwU:triagebot_ping_pls, r=lcnr
[rust.git] / src / test / ui / suggestions / option-to-bool.stderr
1 error[E0308]: mismatched types
2   --> $DIR/option-to-bool.rs:4:16
3    |
4 LL |     if true && x {}
5    |                ^ expected `bool`, found enum `Option`
6    |
7    = note: expected type `bool`
8               found enum `Option<i32>`
9 help: use `Option::is_some` to test if the `Option` has a value
10    |
11 LL |     if true && x.is_some() {}
12    |                 ++++++++++
13
14 error: aborting due to previous error
15
16 For more information about this error, try `rustc --explain E0308`.