-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
Binding a match arm using "as-patterns" ref x @
or ref mut x @
will emit an incorrect error message.
rusti: match Some(1) { ref x@Some(*) => 1, None => 0 }
<anon>:5:10: 5:57 error: non-exhaustive patterns
<anon>:5 match Some(1) { ref x@Some(*) => 1, None => 0 }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rustc will be silent and happy if a third case _ => fail!()
is provided.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.