fix issue #6209
This commit is contained in:
parent
15e44381af
commit
f8af2b50ee
7 changed files with 183 additions and 81 deletions
6
src/test/compile-fail/match-ill-type1.rs
Normal file
6
src/test/compile-fail/match-ill-type1.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
match 1 {
|
||||
1..2u => 1, //~ ERROR mismatched types in range
|
||||
_ => 2,
|
||||
};
|
||||
}
|
||||
7
src/test/compile-fail/match-ill-type2.rs
Normal file
7
src/test/compile-fail/match-ill-type2.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
fn main() {
|
||||
match 1 {
|
||||
1 => 1, //~ ERROR mismatched types between arms
|
||||
2u => 1,
|
||||
_ => 2,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue