Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #35430

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2f5294e
Fixes #35304
mikhail-m1 Aug 5, 2016
e7e5cfe
Merge branch 'master' of https://github.com/rust-lang/rust
mikhail-m1 Aug 5, 2016
424e772
Add error code check in librustc_const_eval/diagnostics.rs
GuillaumeGomez Aug 5, 2016
5bab0e6
Update E0206 message to new format
KiChjang Aug 5, 2016
065c685
Update E0223 to the new format
KiChjang Aug 6, 2016
c9e9d42
Update compiler error 0027 to use new error format.
silenuss Aug 6, 2016
1d25e2e
Update compiler error 0029 to use new error format.
silenuss Aug 6, 2016
f4dd1f9
Updated error message E0252
Aug 5, 2016
eb469d6
Updated E0225 to new format.
razielgn Aug 6, 2016
4e2dd8d
Add new error code tests
GuillaumeGomez Aug 5, 2016
24ddca0
Update error message for E0243 and E0244
Aug 6, 2016
fbd7c55
Rollup merge of #35362 - medzin:E0252, r=GuillaumeGomez
Aug 6, 2016
edd8e04
Rollup merge of #35393 - GuillaumeGomez:err_codes2, r=jonathandturner
Aug 6, 2016
5e84fc4
Rollup merge of #35394 - mikhail-m1:master, r=jonathandturner
Aug 6, 2016
ae59b96
Rollup merge of #35402 - KiChjang:e0206-new-msg, r=GuillaumeGomez
Aug 6, 2016
2fd369f
Rollup merge of #35410 - silenuss:e0027-formatting, r=jonathandturner
Aug 6, 2016
388e7d6
Rollup merge of #35411 - KiChjang:e0223-new-format, r=jonathandturner
Aug 6, 2016
32de7ca
Rollup merge of #35413 - silenuss:e0029-formatting, r=jonathandturner
Aug 6, 2016
14163fa
Rollup merge of #35419 - Keats:err-243, r=jonathandturner
Aug 6, 2016
11022b4
Rollup merge of #35421 - razielgn:updated-e0225-to-new-format, r=jona…
Aug 6, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/librustc_typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
for field in variant.fields
.iter()
.filter(|field| !used_fields.contains_key(&field.name)) {
span_err!(tcx.sess, span, E0027,
"pattern does not mention field `{}`",
field.name);
struct_span_err!(tcx.sess, span, E0027,
"pattern does not mention field `{}`",
field.name)
.span_label(span, &format!("missing field `{}`", field.name))
.emit();
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/test/compile-fail/E0027.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ fn main() {
let d = Dog { name: "Rusty".to_string(), age: 8 };

match d {
Dog { age: x } => {} //~ ERROR E0027
Dog { age: x } => {}
//~^ ERROR pattern does not mention field `name`
//~| NOTE missing field `name`
}
}