]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/option-to-bool.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / 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    |        expected because this is `bool`
8    |
9    = note: expected type `bool`
10               found enum `Option<i32>`
11 help: use `Option::is_some` to test if the `Option` has a value
12    |
13 LL |     if true && x.is_some() {}
14    |                 ++++++++++
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.