mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
10 lines
212 B
Rust
10 lines
212 B
Rust
#![cfg_attr(let_chains, feature(let_chains))]
|
|
|
|
fn foo(x: Option<i32>) {
|
|
if true && x {}
|
|
//~^ ERROR mismatched types
|
|
//~| HELP use `Option::is_some` to test if the `Option` has a value
|
|
}
|
|
|
|
fn main() {}
|