Fix an error message that reversed the expected and actual number of arguments in a pattern
This commit is contained in:
parent
6417610788
commit
4964023c5e
1 changed files with 2 additions and 2 deletions
|
|
@ -1715,9 +1715,9 @@ fn check_pat(&@stmt_ctxt scx, &@ast::pat pat) {
|
|||
if (arg_len != subpats_len) {
|
||||
// TODO: pluralize properly
|
||||
auto err_msg = "tag type " + last_id + " has " +
|
||||
uint::to_str(subpats_len, 10u) +
|
||||
" field(s), but this pattern has " +
|
||||
uint::to_str(arg_len, 10u) +
|
||||
" field(s), but this pattern has " +
|
||||
uint::to_str(subpats_len, 10u) +
|
||||
" field(s)";
|
||||
|
||||
scx.fcx.ccx.sess.span_err(pat.span, err_msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue