mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
14 lines
398 B
Rust
14 lines
398 B
Rust
fn main() {
|
|
match Some(10) {
|
|
//~^ NOTE `match` arms have incompatible types
|
|
Some(5) => false,
|
|
//~^ NOTE this is found to be of type `bool`
|
|
Some(2) => true,
|
|
//~^ NOTE this is found to be of type `bool`
|
|
None => (),
|
|
//~^ ERROR `match` arms have incompatible types
|
|
//~| NOTE expected `bool`, found `()`
|
|
_ => true
|
|
}
|
|
}
|