Fix reversed current/expected type
Fix some reversed type of arm pattern and type of search pattern in error message.
This commit is contained in:
parent
061a223723
commit
35baf5b202
5 changed files with 19 additions and 14 deletions
|
@ -1,11 +1,10 @@
|
|||
// error-pattern: mismatched types
|
||||
|
||||
struct S { a: int }
|
||||
enum E { C(int) }
|
||||
|
||||
fn main() {
|
||||
match S { a: 1 } {
|
||||
C(_) => (),
|
||||
C(_) => (), //~ ERROR mismatched types: expected `S` but found `E`
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue