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