rust/tests/ui/match/issue-11319.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
398 B
Rust
Raw Normal View History

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 => (),
2020-01-04 18:17:46 -06:00
//~^ ERROR `match` arms have incompatible types
//~| NOTE expected `bool`, found `()`
_ => true
}
}