Skip to content

Commit 849f814

Browse files
committed
rustc / test: Fix error message
1 parent d8024e2 commit 849f814

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/librustc/middle/typeck/check/_match.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,10 @@ pub fn check_pointer_pat(pcx: &pat_ctxt,
625625
fcx.infcx().type_error_message_str(span, |actual| {
626626
fmt!("mismatched types: expected `%s` but found %s",
627627
resolved_expected, actual)},
628-
fmt!("an %s pattern", match pointer_kind {
629-
Managed => "@-box",
630-
Owned => "~-box",
631-
Borrowed => "&-pointer"
628+
fmt!("%s pattern", match pointer_kind {
629+
Managed => "an @-box",
630+
Owned => "a ~-box",
631+
Borrowed => "an &-pointer"
632632
}),
633633
None);
634634
fcx.write_error(pat_id);
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
22
match () {
3-
[()] => { } //~ ERROR mismatched type: expected `()` but found vector
3+
[()] => { } //~ ERROR mismatched type: expected `()` but found a vector pattern
44
}
55
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
fn main() {
22
match ~"foo" {
3-
['f', 'o', .._] => { } //~ ERROR mismatched type: expected `~str` but found vector
3+
['f', 'o', .._] => { } //~ ERROR mismatched type: expected `~str` but found a vector pattern
44
_ => { }
55
}
66
}

0 commit comments

Comments
 (0)