]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/option-to-bool.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / suggestions / option-to-bool.rs
1 #![cfg_attr(let_chains, feature(let_chains))]
2
3 fn foo(x: Option<i32>) {
4     if true && x {}
5     //~^ ERROR mismatched types
6     //~| HELP use `Option::is_some` to test if the `Option` has a value
7 }
8
9 fn main() {}