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