Skip to content

Commit

Permalink
rustc / test: Fix error message
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Apr 30, 2013
1 parent d8024e2 commit 849f814
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/librustc/middle/typeck/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,10 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
fcx.infcx().type_error_message_str(span, |actual| {
fmt!("mismatched types: expected `%s` but found %s",
resolved_expected, actual)},
fmt!("an %s pattern", match pointer_kind {
Managed => "@-box",
Owned => "~-box",
Borrowed => "&-pointer"
fmt!("%s pattern", match pointer_kind {
Managed => "an @-box",
Owned => "a ~-box",
Borrowed => "an &-pointer"
}),
None);
fcx.write_error(pat_id);
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/alt-vec-mismatch-2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fn main() {
match () {
[()] => { } //~ ERROR mismatched type: expected `()` but found vector
[()] => { } //~ ERROR mismatched type: expected `()` but found a vector pattern
}
}
2 changes: 1 addition & 1 deletion src/test/compile-fail/alt-vec-mismatch.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fn main() {
match ~"foo" {
['f', 'o', .._] => { } //~ ERROR mismatched type: expected `~str` but found vector
['f', 'o', .._] => { } //~ ERROR mismatched type: expected `~str` but found a vector pattern
_ => { }
}
}

0 comments on commit 849f814

Please sign in to comment.