2014-05-30 22:16:33 +00:00
|
|
|
fn main() {
|
|
|
|
match Some(10) {
|
2019-02-07 13:39:54 +00:00
|
|
|
//~^ NOTE `match` arms have incompatible types
|
2014-05-30 22:16:33 +00:00
|
|
|
Some(5) => false,
|
2019-02-07 13:39:54 +00:00
|
|
|
//~^ NOTE this is found to be of type `bool`
|
2014-05-30 22:16:33 +00:00
|
|
|
Some(2) => true,
|
2019-02-07 13:39:54 +00:00
|
|
|
//~^ NOTE this is found to be of type `bool`
|
2017-12-10 20:29:24 +00:00
|
|
|
None => (),
|
2020-01-05 00:17:46 +00:00
|
|
|
//~^ ERROR `match` arms have incompatible types
|
2019-11-15 17:37:01 +00:00
|
|
|
//~| NOTE expected `bool`, found `()`
|
2014-05-30 22:16:33 +00:00
|
|
|
_ => true
|
|
|
|
}
|
|
|
|
}
|