From 849f8142a244ae08c06ed190c234aa809a68f6c0 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Mon, 29 Apr 2013 20:46:54 -0700 Subject: [PATCH] rustc / test: Fix error message --- src/librustc/middle/typeck/check/_match.rs | 8 ++++---- src/test/compile-fail/alt-vec-mismatch-2.rs | 2 +- src/test/compile-fail/alt-vec-mismatch.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs index e73cf440d4071..5ff7105712183 100644 --- a/src/librustc/middle/typeck/check/_match.rs +++ b/src/librustc/middle/typeck/check/_match.rs @@ -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); diff --git a/src/test/compile-fail/alt-vec-mismatch-2.rs b/src/test/compile-fail/alt-vec-mismatch-2.rs index 9e8fb84951d30..bef18cc666ae6 100644 --- a/src/test/compile-fail/alt-vec-mismatch-2.rs +++ b/src/test/compile-fail/alt-vec-mismatch-2.rs @@ -1,5 +1,5 @@ fn main() { match () { - [()] => { } //~ ERROR mismatched type: expected `()` but found vector + [()] => { } //~ ERROR mismatched type: expected `()` but found a vector pattern } } diff --git a/src/test/compile-fail/alt-vec-mismatch.rs b/src/test/compile-fail/alt-vec-mismatch.rs index ef4d92ea4913b..1f6822cfd2ce5 100644 --- a/src/test/compile-fail/alt-vec-mismatch.rs +++ b/src/test/compile-fail/alt-vec-mismatch.rs @@ -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 _ => { } } }