]> git.lizzy.rs Git - rust.git/commitdiff
Adjust the error messages to match the pattern "expected foo, found bar"
authorJonas Hietala <tradet.h@gmail.com>
Sat, 23 Aug 2014 10:41:32 +0000 (12:41 +0200)
committerJonas Hietala <tradet.h@gmail.com>
Sun, 24 Aug 2014 07:53:01 +0000 (09:53 +0200)
Closes #8492

118 files changed:
src/libfmt_macros/lib.rs
src/librustc/metadata/tydecode.rs
src/librustc/middle/effect.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/astconv.rs
src/librustc/middle/typeck/check/_match.rs
src/librustc/middle/typeck/check/mod.rs
src/librustc/middle/typeck/check/vtable.rs
src/librustc/middle/typeck/infer/error_reporting.rs
src/librustc/middle/typeck/infer/mod.rs
src/libsyntax/ext/asm.rs
src/libsyntax/ext/format.rs
src/libsyntax/parse/attr.rs
src/libsyntax/parse/parser.rs
src/libterm/terminfo/parser/compiled.rs
src/test/compile-fail/asm-misplaced-option.rs
src/test/compile-fail/bad-bang-ann-3.rs
src/test/compile-fail/bad-bang-ann.rs
src/test/compile-fail/bad-const-type.rs
src/test/compile-fail/bang-tailexpr.rs
src/test/compile-fail/block-must-not-have-result-do.rs
src/test/compile-fail/block-must-not-have-result-res.rs
src/test/compile-fail/block-must-not-have-result-while.rs
src/test/compile-fail/closure-bounds-subtype.rs
src/test/compile-fail/column-offset-1-based.rs
src/test/compile-fail/empty-impl-semicolon.rs
src/test/compile-fail/explicit-self-lifetime-mismatch.rs
src/test/compile-fail/extern-expected-fn-or-brace.rs
src/test/compile-fail/extern-foreign-crate.rs
src/test/compile-fail/fully-qualified-type-name2.rs
src/test/compile-fail/fully-qualified-type-name3.rs
src/test/compile-fail/generic-type-less-params-with-defaults.rs
src/test/compile-fail/generic-type-more-params-with-defaults.rs
src/test/compile-fail/generic-type-params-name-repr.rs
src/test/compile-fail/if-branch-types.rs
src/test/compile-fail/if-without-else-result.rs
src/test/compile-fail/inherit-struct4.rs
src/test/compile-fail/integer-literal-suffix-inference.rs
src/test/compile-fail/issue-10764.rs
src/test/compile-fail/issue-11319.rs
src/test/compile-fail/issue-11515.rs
src/test/compile-fail/issue-12997-2.rs
src/test/compile-fail/issue-13482.rs
src/test/compile-fail/issue-13599.rs
src/test/compile-fail/issue-14845.rs
src/test/compile-fail/issue-15094.rs
src/test/compile-fail/issue-16338.rs
src/test/compile-fail/issue-16401.rs
src/test/compile-fail/issue-1655.rs
src/test/compile-fail/issue-2951.rs
src/test/compile-fail/issue-3036.rs
src/test/compile-fail/issue-3477.rs
src/test/compile-fail/issue-3680.rs
src/test/compile-fail/issue-4517.rs
src/test/compile-fail/issue-4968.rs
src/test/compile-fail/issue-5100.rs
src/test/compile-fail/issue-5358-1.rs
src/test/compile-fail/issue-6610.rs
src/test/compile-fail/issue-7061.rs
src/test/compile-fail/issue-7092.rs
src/test/compile-fail/issue-8761.rs
src/test/compile-fail/issue13359.rs
src/test/compile-fail/loop-does-not-diverge.rs
src/test/compile-fail/macro-bad-delimiter-ident.rs
src/test/compile-fail/match-struct.rs
src/test/compile-fail/match-vec-mismatch-2.rs
src/test/compile-fail/multitrait.rs
src/test/compile-fail/mut-patterns.rs
src/test/compile-fail/noexporttypeexe.rs
src/test/compile-fail/non-constant-enum-for-vec-repeat.rs
src/test/compile-fail/non-constant-expr-for-vec-repeat.rs
src/test/compile-fail/omitted-arg-in-item-fn.rs
src/test/compile-fail/pattern-error-continue.rs
src/test/compile-fail/pptypedef.rs
src/test/compile-fail/raw-str-unbalanced.rs
src/test/compile-fail/regions-bounds.rs
src/test/compile-fail/regions-infer-paramd-indirect.rs
src/test/compile-fail/regions-infer-paramd-method.rs
src/test/compile-fail/regions-trait-3.rs
src/test/compile-fail/removed-syntax-closure-lifetime.rs
src/test/compile-fail/removed-syntax-const-item.rs
src/test/compile-fail/removed-syntax-enum-newtype.rs
src/test/compile-fail/removed-syntax-field-let.rs
src/test/compile-fail/removed-syntax-field-semicolon.rs
src/test/compile-fail/removed-syntax-fixed-vec.rs
src/test/compile-fail/removed-syntax-fn-pure.rs
src/test/compile-fail/removed-syntax-fn-sigil.rs
src/test/compile-fail/removed-syntax-larrow-init.rs
src/test/compile-fail/removed-syntax-larrow-move.rs
src/test/compile-fail/removed-syntax-mut-vec-expr.rs
src/test/compile-fail/removed-syntax-mut-vec-ty.rs
src/test/compile-fail/removed-syntax-ptr-lifetime.rs
src/test/compile-fail/removed-syntax-uniq-mut-expr.rs
src/test/compile-fail/removed-syntax-uniq-mut-ty.rs
src/test/compile-fail/removed-syntax-with-1.rs
src/test/compile-fail/removed-syntax-with-2.rs
src/test/compile-fail/repeat_count.rs
src/test/compile-fail/slightly-nice-generic-literal-messages.rs
src/test/compile-fail/struct-base-wrong-type.rs
src/test/compile-fail/structure-constructor-type-mismatch.rs
src/test/compile-fail/suppressed-error.rs
src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
src/test/compile-fail/terr-in-field.rs
src/test/compile-fail/terr-sorts.rs
src/test/compile-fail/trait-coercion-generic-bad.rs
src/test/compile-fail/trait-impl-method-mismatch.rs
src/test/compile-fail/tuple-arity-mismatch.rs
src/test/compile-fail/tutorial-suffix-inference-test.rs
src/test/compile-fail/type-parameter-names.rs
src/test/compile-fail/type-params-in-different-spaces-2.rs
src/test/compile-fail/typeck_type_placeholder_lifetime_1.rs
src/test/compile-fail/typeck_type_placeholder_lifetime_2.rs
src/test/compile-fail/typeck_type_placeholder_mismatch.rs
src/test/compile-fail/unsized.rs
src/test/compile-fail/variadic-ffi.rs
src/test/compile-fail/wrong-mul-method-signature.rs
src/test/run-make/unicode-input/multiple_files.rs
src/test/run-pass/issue-2804.rs

index d41035d3a160fed29d0687ddbef2d1cf8842562c..cef258fac20f0d98ffbcf3117c096dc3d56cb16c 100644 (file)
@@ -200,7 +200,7 @@ fn must_consume(&mut self, c: char) {
                 self.cur.next();
             }
             Some((_, other)) => {
-                self.err(format!("expected `{}` but found `{}`",
+                self.err(format!("expected `{}`, found `{}`",
                                  c,
                                  other).as_slice());
             }
index e6e7d8bf8d1a63de55d13de394233fef1cea65fc..b26a12d5cfc36b7c86a8600b5d16d36972e03254 100644 (file)
@@ -575,12 +575,12 @@ pub fn parse_def_id(buf: &[u8]) -> ast::DefId {
 
     let crate_num = match uint::parse_bytes(crate_part, 10u) {
        Some(cn) => cn as ast::CrateNum,
-       None => fail!("internal error: parse_def_id: crate number expected, but found {:?}",
+       None => fail!("internal error: parse_def_id: crate number expected, found {:?}",
                      crate_part)
     };
     let def_num = match uint::parse_bytes(def_part, 10u) {
        Some(dn) => dn as ast::NodeId,
-       None => fail!("internal error: parse_def_id: id expected, but found {:?}",
+       None => fail!("internal error: parse_def_id: id expected, found {:?}",
                      def_part)
     };
     ast::DefId { krate: crate_num, node: def_num }
index e6160038b1d8c29662a7e57268ec423730713541..dc4ecb358308d5e3a0cb91f2159b1ade2ee7c4ab 100644 (file)
@@ -122,7 +122,7 @@ fn visit_block(&mut self, block: &ast::Block, _:()) {
                 // we need to create a new context, when we're
                 // - outside `unsafe` and found a `unsafe` block
                 //   (normal case)
-                // - inside `unsafe` but found an `unsafe` block
+                // - inside `unsafe`, found an `unsafe` block
                 //   created internally to the compiler
                 //
                 // The second case is necessary to ensure that the
index 2b768c811e7158c8bf899948ec13ddb52aa6aa4b..dc463ffe5df680d9fd68f15f5611f43bc165345d 100644 (file)
@@ -3603,17 +3603,17 @@ fn tstore_to_closure(s: &TraitStore) -> String {
     match *err {
         terr_mismatch => "types differ".to_string(),
         terr_fn_style_mismatch(values) => {
-            format!("expected {} fn but found {} fn",
+            format!("expected {} fn, found {} fn",
                     values.expected.to_string(),
                     values.found.to_string())
         }
         terr_abi_mismatch(values) => {
-            format!("expected {} fn but found {} fn",
+            format!("expected {} fn, found {} fn",
                     values.expected.to_string(),
                     values.found.to_string())
         }
         terr_onceness_mismatch(values) => {
-            format!("expected {} fn but found {} fn",
+            format!("expected {} fn, found {} fn",
                     values.expected.to_string(),
                     values.found.to_string())
         }
@@ -3630,20 +3630,20 @@ fn tstore_to_closure(s: &TraitStore) -> String {
         terr_ptr_mutability => "pointers differ in mutability".to_string(),
         terr_ref_mutability => "references differ in mutability".to_string(),
         terr_ty_param_size(values) => {
-            format!("expected a type with {} type params \
-                     but found one with {} type params",
+            format!("expected a type with {} type params, \
+                     found one with {} type params",
                     values.expected,
                     values.found)
         }
         terr_tuple_size(values) => {
-            format!("expected a tuple with {} elements \
-                     but found one with {} elements",
+            format!("expected a tuple with {} elements, \
+                     found one with {} elements",
                     values.expected,
                     values.found)
         }
         terr_record_size(values) => {
-            format!("expected a record with {} fields \
-                     but found one with {} fields",
+            format!("expected a record with {} fields, \
+                     found one with {} fields",
                     values.expected,
                     values.found)
         }
@@ -3651,7 +3651,7 @@ fn tstore_to_closure(s: &TraitStore) -> String {
             "record elements differ in mutability".to_string()
         }
         terr_record_fields(values) => {
-            format!("expected a record with field `{}` but found one \
+            format!("expected a record with field `{}`, found one \
                      with field `{}`",
                     token::get_ident(values.expected),
                     token::get_ident(values.found))
@@ -3670,57 +3670,57 @@ fn tstore_to_closure(s: &TraitStore) -> String {
         }
         terr_regions_insufficiently_polymorphic(br, _) => {
             format!("expected bound lifetime parameter {}, \
-                     but found concrete lifetime",
+                     found concrete lifetime",
                     bound_region_ptr_to_string(cx, br))
         }
         terr_regions_overly_polymorphic(br, _) => {
             format!("expected concrete lifetime, \
-                     but found bound lifetime parameter {}",
+                     found bound lifetime parameter {}",
                     bound_region_ptr_to_string(cx, br))
         }
         terr_trait_stores_differ(_, ref values) => {
-            format!("trait storage differs: expected `{}` but found `{}`",
+            format!("trait storage differs: expected `{}`, found `{}`",
                     trait_store_to_string(cx, (*values).expected),
                     trait_store_to_string(cx, (*values).found))
         }
         terr_sorts(values) => {
-            format!("expected {} but found {}",
+            format!("expected {}, found {}",
                     ty_sort_string(cx, values.expected),
                     ty_sort_string(cx, values.found))
         }
         terr_traits(values) => {
-            format!("expected trait `{}` but found trait `{}`",
+            format!("expected trait `{}`, found trait `{}`",
                     item_path_str(cx, values.expected),
                     item_path_str(cx, values.found))
         }
         terr_builtin_bounds(values) => {
             if values.expected.is_empty() {
-                format!("expected no bounds but found `{}`",
+                format!("expected no bounds, found `{}`",
                         values.found.user_string(cx))
             } else if values.found.is_empty() {
-                format!("expected bounds `{}` but found no bounds",
+                format!("expected bounds `{}`, found no bounds",
                         values.expected.user_string(cx))
             } else {
-                format!("expected bounds `{}` but found bounds `{}`",
+                format!("expected bounds `{}`, found bounds `{}`",
                         values.expected.user_string(cx),
                         values.found.user_string(cx))
             }
         }
         terr_integer_as_char => {
-            "expected an integral type but found `char`".to_string()
+            "expected an integral type, found `char`".to_string()
         }
         terr_int_mismatch(ref values) => {
-            format!("expected `{}` but found `{}`",
+            format!("expected `{}`, found `{}`",
                     values.expected.to_string(),
                     values.found.to_string())
         }
         terr_float_mismatch(ref values) => {
-            format!("expected `{}` but found `{}`",
+            format!("expected `{}`, found `{}`",
                     values.expected.to_string(),
                     values.found.to_string())
         }
         terr_variadic_mismatch(ref values) => {
-            format!("expected {} fn but found {} function",
+            format!("expected {} fn, found {} function",
                     if values.expected { "variadic" } else { "non-variadic" },
                     if values.found { "variadic" } else { "non-variadic" })
         }
@@ -4548,7 +4548,7 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::Expr) ->
         const_eval::const_int(count) => if count < 0 {
             tcx.ty_ctxt().sess.span_err(count_expr.span,
                                         "expected positive integer for \
-                                         repeat count but found negative integer");
+                                         repeat count, found negative integer");
             return 0;
         } else {
             return count as uint
@@ -4557,38 +4557,38 @@ pub fn eval_repeat_count<T: ExprTyProvider>(tcx: &T, count_expr: &ast::Expr) ->
         const_eval::const_float(count) => {
             tcx.ty_ctxt().sess.span_err(count_expr.span,
                                         "expected positive integer for \
-                                         repeat count but found float");
+                                         repeat count, found float");
             return count as uint;
         }
         const_eval::const_str(_) => {
             tcx.ty_ctxt().sess.span_err(count_expr.span,
                                         "expected positive integer for \
-                                         repeat count but found string");
+                                         repeat count, found string");
             return 0;
         }
         const_eval::const_bool(_) => {
             tcx.ty_ctxt().sess.span_err(count_expr.span,
                                         "expected positive integer for \
-                                         repeat count but found boolean");
+                                         repeat count, found boolean");
             return 0;
         }
         const_eval::const_binary(_) => {
             tcx.ty_ctxt().sess.span_err(count_expr.span,
                                         "expected positive integer for \
-                                         repeat count but found binary array");
+                                         repeat count, found binary array");
             return 0;
         }
         const_eval::const_nil => {
             tcx.ty_ctxt().sess.span_err(count_expr.span,
                                         "expected positive integer for \
-                                         repeat count but found ()");
+                                         repeat count, found ()");
             return 0;
         }
       },
       Err(..) => {
         tcx.ty_ctxt().sess.span_err(count_expr.span,
-                                    "expected constant integer for repeat count \
-                                     but found variable");
+                                    "expected constant integer for repeat count, \
+                                     found variable");
         return 0;
       }
     }
index d646dc9c0823a5a6f08275330d5d9bab54fabdb7..129a039a267ba67043b7b7bbf565bdc5a0c73138 100644 (file)
@@ -191,7 +191,7 @@ fn ast_path_substs<AC:AstConv,RS:RegionScope>(
 
         if supplied_num_region_params != 0 || anon_regions.is_err() {
             span_err!(tcx.sess, path.span, E0107,
-                "wrong number of lifetime parameters: expected {} but found {}",
+                "wrong number of lifetime parameters: expected {}, found {}",
                 expected_num_region_params, supplied_num_region_params);
         }
 
@@ -216,7 +216,7 @@ fn ast_path_substs<AC:AstConv,RS:RegionScope>(
             "expected"
         };
         this.tcx().sess.span_fatal(path.span,
-            format!("wrong number of type arguments: {} {} but found {}",
+            format!("wrong number of type arguments: {} {}, found {}",
                     expected,
                     required_ty_param_count,
                     supplied_ty_param_count).as_slice());
@@ -227,7 +227,7 @@ fn ast_path_substs<AC:AstConv,RS:RegionScope>(
             "expected"
         };
         this.tcx().sess.span_fatal(path.span,
-            format!("wrong number of type arguments: {} {} but found {}",
+            format!("wrong number of type arguments: {} {}, found {}",
                     expected,
                     formal_ty_param_count,
                     supplied_ty_param_count).as_slice());
index ff49aa8a40b0387fc37fa1870644e3e42f1d6b29..18f4607a83cac11db2cff6972abe2a09ebd7ae16 100644 (file)
@@ -169,7 +169,7 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: &ast::Pat, path: &ast::Path,
                     fcx.infcx().type_error_message_str_with_expected(pat.span,
                                                        |expected, actual| {
                        expected.map_or("".to_string(), |e| {
-                        format!("mismatched types: expected `{}` but found {}",
+                        format!("mismatched types: expected `{}`, found {}",
                                 e, actual)
                         })},
                         Some(expected),
@@ -223,7 +223,7 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: &ast::Pat, path: &ast::Path,
                                                |expected, actual| {
                                                expected.map_or("".to_string(),
                                                               |e| {
-                        format!("mismatched types: expected `{}` but found {}",
+                        format!("mismatched types: expected `{}`, found {}",
                                 e, actual)
                     })
                 },
@@ -395,7 +395,7 @@ pub fn check_struct_like_enum_variant_pat(pcx: &pat_ctxt,
         Some(&def::DefTy(..)) => {
             let name = pprust::path_to_string(path);
             span_err!(tcx.sess, span, E0028,
-                "mismatched types: expected `{}` but found `{}`",
+                "mismatched types: expected `{}`, found `{}`",
                 fcx.infcx().ty_to_string(expected), name);
         }
         _ => {
@@ -548,7 +548,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
                             expected.map_or("".to_string(),
                                             |e| {
                                 format!("mismatched types: expected \
-                                        `{}` but found {}", e, actual)
+                                        `{}`, found {}", e, actual)
                             })},
                             Some(expected),
                             "a structure pattern".to_string(),
@@ -607,8 +607,8 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
                                                                  |expected,
                                                                   actual| {
                         expected.map_or("".to_string(), |e| {
-                            format!("mismatched types: expected `{}` \
-                                     but found {}", e, actual)
+                            format!("mismatched types: expected `{}`, \
+                                     found {}", e, actual)
                         }
                     )},
                     Some(expected),
@@ -645,7 +645,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
                 |expected, actual| {
                     expected.map_or("".to_string(),
                                     |e| {
-                        format!("mismatched types: expected `{}` but found {}",
+                        format!("mismatched types: expected `{}`, found {}",
                                 e, actual)
                     })
                 },
@@ -763,7 +763,7 @@ fn check_pointer_pat(pcx: &pat_ctxt,
                 span,
                 |expected, actual| {
                     expected.map_or("".to_string(), |e| {
-                        format!("mismatched types: expected `{}` but found {}",
+                        format!("mismatched types: expected `{}`, found {}",
                                 e, actual)
                     })
                 },
index 8a9c147f60f9c7aa3ef0e10fd4f5a2ade1cf6739..02115590c7e103f504de48e573916f97f5a1d08e 100644 (file)
@@ -2313,7 +2313,7 @@ fn check_call(fcx: &FnCtxt,
             ty::ty_closure(box ty::ClosureTy {sig: ref sig, ..}) => sig,
             _ => {
                 fcx.type_error_message(call_expr.span, |actual| {
-                    format!("expected function but found `{}`", actual)
+                    format!("expected function, found `{}`", actual)
                 }, fn_ty, None);
                 &error_fn_sig
             }
@@ -3811,7 +3811,7 @@ fn repr(&self, tcx: &ty::ctxt) -> String {
 pub fn require_uint(fcx: &FnCtxt, sp: Span, t: ty::t) {
     if !type_is_uint(fcx, sp, t) {
         fcx.type_error_message(sp, |actual| {
-            format!("mismatched types: expected `uint` type but found `{}`",
+            format!("mismatched types: expected `uint` type, found `{}`",
                     actual)
         }, t, None);
     }
@@ -3820,7 +3820,7 @@ pub fn require_uint(fcx: &FnCtxt, sp: Span, t: ty::t) {
 pub fn require_integral(fcx: &FnCtxt, sp: Span, t: ty::t) {
     if !type_is_integral(fcx, sp, t) {
         fcx.type_error_message(sp, |actual| {
-            format!("mismatched types: expected integral type but found `{}`",
+            format!("mismatched types: expected integral type, found `{}`",
                     actual)
         }, t, None);
     }
@@ -4336,28 +4336,28 @@ pub fn polytype_for_def(fcx: &FnCtxt,
       def::DefTy(_) |
       def::DefPrimTy(_) |
       def::DefTyParam(..)=> {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found type");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found type");
       }
       def::DefMod(..) | def::DefForeignMod(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found module");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found module");
       }
       def::DefUse(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found use");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found use");
       }
       def::DefRegion(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found region");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found region");
       }
       def::DefTyParamBinder(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found type parameter");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found type parameter");
       }
       def::DefLabel(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found label");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found label");
       }
       def::DefSelfTy(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found self ty");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found self ty");
       }
       def::DefMethod(..) => {
-        fcx.ccx.tcx.sess.span_bug(sp, "expected value but found method");
+        fcx.ccx.tcx.sess.span_bug(sp, "expected value, found method");
       }
     }
 }
@@ -4585,8 +4585,8 @@ fn push_explicit_parameters_from_segment_to_substs(
                 } else if i == type_count {
                     span_err!(fcx.tcx().sess, typ.span, E0087,
                         "too many type parameters provided: \
-                         expected at most {} parameter(s) \
-                         but found {} parameter(s)",
+                         expected at most {} parameter(s), \
+                         found {} parameter(s)",
                          type_count, segment.types.len());
                     substs.types.truncate(space, 0);
                 }
@@ -4603,7 +4603,7 @@ fn push_explicit_parameters_from_segment_to_substs(
                 } else if i == region_count {
                     span_err!(fcx.tcx().sess, lifetime.span, E0088,
                         "too many lifetime parameters provided: \
-                         expected {} parameter(s) but found {} parameter(s)",
+                         expected {} parameter(s), found {} parameter(s)",
                         region_count,
                         segment.lifetimes.len());
                     substs.mut_regions().truncate(space, 0);
@@ -4652,7 +4652,7 @@ fn adjust_type_parameters(
                 if desired.len() != required_len { "at least " } else { "" };
             span_err!(fcx.tcx().sess, span, E0089,
                 "too few type parameters provided: expected {}{} parameter(s) \
-                 but found {} parameter(s)",
+                , found {} parameter(s)",
                 qualifier, required_len, provided_len);
             substs.types.replace(space,
                                  Vec::from_elem(desired.len(), ty::mk_err()));
@@ -4705,8 +4705,8 @@ fn adjust_region_parameters(
         // Otherwise, too few were provided. Report an error and then
         // use inference variables.
         span_err!(fcx.tcx().sess, span, E0090,
-            "too few lifetime parameters provided: expected {} parameter(s) \
-             but found {} parameter(s)",
+            "too few lifetime parameters provided: expected {} parameter(s), \
+             found {} parameter(s)",
             desired.len(), provided_len);
 
         substs.mut_regions().replace(
index 30afe761a4849d20697e4343df12fc14d318f62b..bc53ed58f6fd510b47c88617dbf2620affe375ba 100644 (file)
@@ -206,7 +206,7 @@ fn relate_trait_refs(vcx: &VtableContext,
                 !ty::trait_ref_contains_error(&r_exp_trait_ref)
             {
                 let tcx = vcx.tcx();
-                span_err!(tcx.sess, span, E0095, "expected {}, but found {} ({})",
+                span_err!(tcx.sess, span, E0095, "expected {}, found {} ({})",
                           ppaux::trait_ref_to_string(tcx, &r_exp_trait_ref),
                           ppaux::trait_ref_to_string(tcx, &r_act_trait_ref),
                           ty::type_err_to_str(tcx, err));
index beaf81409a38b39c91ad8dd6c37d1d7ae17817ac..5b9b37ab8441b8aeddae271022a190ce824010b9 100644 (file)
@@ -377,7 +377,7 @@ fn report_and_explain_type_error(&self,
 
     fn values_str(&self, values: &ValuePairs) -> Option<String> {
         /*!
-         * Returns a string of the form "expected `{}` but found `{}`",
+         * Returns a string of the form "expected `{}`, found `{}`",
          * or None if this is a derived error.
          */
         match *values {
@@ -405,7 +405,7 @@ fn expected_found_str<T:UserString+Resolvable>(
             return None;
         }
 
-        Some(format!("expected `{}` but found `{}`",
+        Some(format!("expected `{}`, found `{}`",
                      expected.user_string(self.tcx),
                      found.user_string(self.tcx)))
     }
index 30fffc42a3f97f1b28bac0722d7d39300370bfcb..5629a0855003f1b5da290d5c882a255d59bf628c 100644 (file)
@@ -799,7 +799,7 @@ pub fn report_mismatched_types(&self,
             _ => {
                 // if I leave out : String, it infers &str and complains
                 |actual: String| {
-                    format!("mismatched types: expected `{}` but found `{}`",
+                    format!("mismatched types: expected `{}`, found `{}`",
                             self.ty_to_string(resolved_expected),
                             actual)
                 }
index 43fa0964f80f94d854fb912a9e9b7df56b42f55b..180f2409b8a8cc9d887065ac39f5d679ad9c80ec 100644 (file)
@@ -151,7 +151,7 @@ pub fn expand_asm(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
                     clobs.push(clob);
 
                     if OPTIONS.iter().any(|opt| s.equiv(opt)) {
-                        cx.span_warn(p.last_span, "expected a clobber, but found an option");
+                        cx.span_warn(p.last_span, "expected a clobber, found an option");
                     }
                 }
 
index 835181d55c4573da039584103f8688b85620a9aa..124e9e95942775116ffae5e0c790d3316fb034d1 100644 (file)
@@ -128,7 +128,7 @@ fn parse_args(ecx: &mut ExtCtxt, sp: Span, allow_method: bool,
                 }
                 _ => {
                     ecx.span_err(p.span,
-                                 format!("expected ident for named argument, but found `{}`",
+                                 format!("expected ident for named argument, found `{}`",
                                          p.this_token_to_string()).as_slice());
                     return (invocation, None);
                 }
index 550dbfdab71f77ee42a171cd1d057a79cbd45ca8..eca02d06ca9f846d50e97daf3b75cfae405cceac 100644 (file)
@@ -92,7 +92,7 @@ fn parse_attribute(&mut self, permit_inner: bool) -> ast::Attribute {
             }
             _ => {
                 let token_str = self.this_token_to_string();
-                self.fatal(format!("expected `#` but found `{}`",
+                self.fatal(format!("expected `#`, found `{}`",
                                    token_str).as_slice());
             }
         };
index 9e2829e638050005d4e4f630cf97cb3bd313601b..e798ca0e38a8ade758884ac327d2a703988437d7 100644 (file)
@@ -413,7 +413,7 @@ pub fn expect(&mut self, t: &token::Token) {
         } else {
             let token_str = Parser::token_to_string(t);
             let this_token_str = self.this_token_to_string();
-            self.fatal(format!("expected `{}` but found `{}`",
+            self.fatal(format!("expected `{}`, found `{}`",
                                token_str,
                                this_token_str).as_slice())
         }
@@ -447,11 +447,11 @@ fn tokens_to_string(tokens: &[token::Token]) -> String {
             let actual = self.this_token_to_string();
             self.fatal(
                 (if expected.len() != 1 {
-                    (format!("expected one of `{}` but found `{}`",
+                    (format!("expected one of `{}`, found `{}`",
                              expect,
                              actual))
                 } else {
-                    (format!("expected `{}` but found `{}`",
+                    (format!("expected `{}`, found `{}`",
                              expect,
                              actual))
                 }).as_slice()
@@ -1314,7 +1314,7 @@ pub fn parse_trait_methods(&mut self) -> Vec<TraitItem> {
 
               _ => {
                   let token_str = p.this_token_to_string();
-                  p.fatal((format!("expected `;` or `{{` but found `{}`",
+                  p.fatal((format!("expected `;` or `{{`, found `{}`",
                                    token_str)).as_slice())
               }
             }
@@ -3375,7 +3375,7 @@ fn check_expected_item(p: &mut Parser, found_attrs: bool) {
                         ""
                     };
                     let tok_str = self.this_token_to_string();
-                    self.fatal(format!("expected {}`(` or `{{`, but found `{}`",
+                    self.fatal(format!("expected {}`(` or `{{`, found `{}`",
                                        ident_str,
                                        tok_str).as_slice())
                 }
@@ -3924,7 +3924,7 @@ fn expect_self_ident(&mut self) -> ast::Ident {
             },
             _ => {
                 let token_str = self.this_token_to_string();
-                self.fatal(format!("expected `self` but found `{}`",
+                self.fatal(format!("expected `self`, found `{}`",
                                    token_str).as_slice())
             }
         }
@@ -4455,7 +4455,7 @@ fn parse_item_struct(&mut self, is_virtual: bool) -> ItemInfo {
         } else {
             let token_str = self.this_token_to_string();
             self.fatal(format!("expected `{}`, `(`, or `;` after struct \
-                                name but found `{}`", "{",
+                                name, found `{}`", "{",
                                token_str).as_slice())
         }
 
@@ -4486,7 +4486,7 @@ pub fn parse_single_struct_field(&mut self,
                 let span = self.span;
                 let token_str = self.this_token_to_string();
                 self.span_fatal(span,
-                                format!("expected `,`, or `}}` but found `{}`",
+                                format!("expected `,`, or `}}`, found `{}`",
                                         token_str).as_slice())
             }
         }
@@ -4566,7 +4566,7 @@ fn parse_mod_items(&mut self,
               }
               _ => {
                   let token_str = self.this_token_to_string();
-                  self.fatal(format!("expected item but found `{}`",
+                  self.fatal(format!("expected item, found `{}`",
                                      token_str).as_slice())
               }
             }
@@ -5107,7 +5107,7 @@ fn parse_item_or_view_item(&mut self,
             let span = self.span;
             let token_str = self.this_token_to_string();
             self.span_fatal(span,
-                            format!("expected `{}` or `fn` but found `{}`", "{",
+                            format!("expected `{}` or `fn`, found `{}`", "{",
                                     token_str).as_slice());
         }
 
index 94ed7fbbf306e02a71b54eb7a24de294eb7b669c..2826ecc1a12225540322959bc510ecda9bf91d33 100644 (file)
@@ -184,7 +184,7 @@ macro_rules! try( ($e:expr) => (
     // Check magic number
     let magic = try!(file.read_le_u16());
     if magic != 0x011A {
-        return Err(format!("invalid magic number: expected {:x} but found {:x}",
+        return Err(format!("invalid magic number: expected {:x}, found {:x}",
                            0x011Au, magic as uint));
     }
 
index d90e40687858e2381a60f2253562bdb170e4141b..8e93b91276f2ea20b5539e20552dafb7e8bebbbe 100644 (file)
@@ -29,7 +29,7 @@ pub fn main() {
     unsafe {
         // comma in place of a colon
         asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8u) : "cc", "volatile");
-        //~^ WARNING expected a clobber, but found an option
+        //~^ WARNING expected a clobber, found an option
     }
     assert_eq!(x, 13);
 }
index d899459b70a1f815cdd33a4d583424c0e1b4feff..943169be00452630ad0ec8ca8ea66378e180de7e 100644 (file)
@@ -12,7 +12,7 @@
 
 fn bad_bang(i: uint) -> ! {
     return 7u;
-    //~^ ERROR expected `!` but found `uint`
+    //~^ ERROR expected `!`, found `uint`
 }
 
 fn main() { bad_bang(5u); }
index 829253bde187f8bb9950a2814efc6f66c15313e2..18b98eb3a3881dacb81f740a4906652758abf790 100644 (file)
@@ -12,7 +12,7 @@
 
 fn bad_bang(i: uint) -> ! {
     if i < 0u { } else { fail!(); }
-    //~^ ERROR expected `!` but found `()`
+    //~^ ERROR expected `!`, found `()`
 }
 
 fn main() { bad_bang(5u); }
index 144b02e9b3bf005ad7de738119fa999d44063aaf..13b19141c16cca344dd04440cc011eb4f8872dc3 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:expected `collections::string::String` but found `int`
+// error-pattern:expected `collections::string::String`, found `int`
 
 static i: String = 10i;
 fn main() { println!("{}", i); }
index af78e19e8c2e21ebcaa3f3bd11590f63c0fc00b3..ff95f05279eea003c4c7d1abb1a6f826c00f562c 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 fn f() -> ! {
-    3i //~ ERROR expected `!` but found `int`
+    3i //~ ERROR expected `!`, found `int`
 }
 fn main() { }
index abeefa4aac81015c31a88ab7b0ba9543c92248c9..687171f8c1f9b348d3dbbb50f13a9a4962cc1fe6 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()` but found `bool`
+// error-pattern:mismatched types: expected `()`, found `bool`
 
 fn main() {
     loop {
index df42244fd0fc8cfc669210999594c309f2f577e4..328c032325e0921a64542fd146c3c9368eebb837 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()` but found `bool`
+// error-pattern:mismatched types: expected `()`, found `bool`
 
 struct r;
 
index e4aceabf0c8fbc0e81d8c748262a256270788d74..ed903f3fd65517fe6acbdb950a68ccbf2593878a 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()` but found `bool`
+// error-pattern:mismatched types: expected `()`, found `bool`
 
 fn main() {
     while true {
index 51188e5dce4120d5831257458f6dd59b2494a450..d69a56b76b0b4fe08506c5459389c5158c4d5c47 100644 (file)
@@ -21,7 +21,7 @@ fn give_any(f: ||:) {
 
 fn give_owned(f: ||:Send) {
     take_any(f);
-    take_const_owned(f); //~ ERROR expected bounds `Send+Sync` but found bounds `Send`
+    take_const_owned(f); //~ ERROR expected bounds `Send+Sync`, found bounds `Send`
 }
 
 fn main() {}
index 3a6594f64f36abc28213581bfa4ba4ca1b30bc69..a00ded61758c28d8c4673ac6c6512604a3203ce9 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-# //~ ERROR 11:1: 11:2 error: expected `[` but found `<eof>`
+# //~ ERROR 11:1: 11:2 error: expected `[`, found `<eof>`
index 1a8751cb91aeb58aea687a8fcd2750a17222fc07..b5f17eef886853ff9bb725240dac89e5d4fec00e 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-impl Foo; //~ ERROR expected `{` but found `;`
+impl Foo; //~ ERROR expected `{`, found `;`
index 285792e26b1bf6678fb10fd737adb9e47edcab8f..b5346a1c5d1f71457b90340250a6cc5dec80a546 100644 (file)
@@ -16,10 +16,10 @@ struct Foo<'a,'b> {
 impl<'a,'b> Foo<'a,'b> {
     // The number of errors is related to the way invariance works.
     fn bar(self: Foo<'b,'a>) {}
-    //~^ ERROR mismatched types: expected `Foo<'a,'b>` but found `Foo<'b,'a>`
-    //~^^ ERROR mismatched types: expected `Foo<'a,'b>` but found `Foo<'b,'a>`
-    //~^^^ ERROR mismatched types: expected `Foo<'b,'a>` but found `Foo<'a,'b>`
-    //~^^^^ ERROR mismatched types: expected `Foo<'b,'a>` but found `Foo<'a,'b>`
+    //~^ ERROR mismatched types: expected `Foo<'a,'b>`, found `Foo<'b,'a>`
+    //~^^ ERROR mismatched types: expected `Foo<'a,'b>`, found `Foo<'b,'a>`
+    //~^^^ ERROR mismatched types: expected `Foo<'b,'a>`, found `Foo<'a,'b>`
+    //~^^^^ ERROR mismatched types: expected `Foo<'b,'a>`, found `Foo<'a,'b>`
 }
 
 fn main() {}
index 638253f816ac6642458abb549636997f4c462ce1..7d1110cf6df83b48d81e137a88c1f0864f73bae6 100644 (file)
@@ -11,4 +11,4 @@
 // Verifies that the expected token errors for `extern crate` are
 // raised
 
-extern "C" mod foo; //~ERROR expected `{` or `fn` but found `mod`
+extern "C" mod foo; //~ERROR expected `{` or `fn`, found `mod`
index ffa6ffb042fe9ad64d020de16d4bc5669c5a313c..97a5f2a11e96addc71e11850dd258ed679bc56ae 100644 (file)
@@ -11,4 +11,4 @@
 // Verifies that the expected token errors for `extern crate` are
 // raised
 
-extern crate foo {} //~ERROR expected one of `=`, `;` but found `{`
+extern crate foo {} //~ERROR expected one of `=`, `;`, found `{`
index 986d19669b91ea917b8a51b4f834278b3b2bdb58..94af50dac0ea5d29f4aa6b02d220bbeed5404e49 100644 (file)
@@ -20,7 +20,7 @@ pub enum foo { }
 
 fn bar(x: x::foo) -> y::foo {
     return x;
-    //~^ ERROR mismatched types: expected `y::foo` but found `x::foo`
+    //~^ ERROR mismatched types: expected `y::foo`, found `x::foo`
 }
 
 fn main() {
index d20ab27d6cfe3db0d6e742063d704a063ee1b6c9..0a5a54b9a275a885413b93b61ff63d1c1634e960 100644 (file)
@@ -17,7 +17,7 @@
 
 fn bar(x: T1) -> T2 {
     return x;
-    //~^ ERROR mismatched types: expected `T2` but found `T1`
+    //~^ ERROR mismatched types: expected `T2`, found `T1`
 }
 
 fn main() {
index d1fa40bd22cd5fa67e8b5fe026d47e2bab68d383..ec226061e2abed207765581e4c8edd18f63a40db 100644 (file)
@@ -15,5 +15,5 @@
 struct Vec<T, A = Heap>;
 
 fn main() {
-    let _: Vec; //~ ERROR wrong number of type arguments: expected at least 1 but found 0
+    let _: Vec; //~ ERROR wrong number of type arguments: expected at least 1, found 0
 }
index 2f3f91a9c3d715cc0f7b9ca4e6b4078da95d8c4e..b16abd1757548e0a82c378c544d72ca6b258d306 100644 (file)
@@ -16,5 +16,5 @@
 
 fn main() {
     let _: Vec<int, Heap, bool>;
-    //~^ ERROR wrong number of type arguments: expected at most 2 but found 3
+    //~^ ERROR wrong number of type arguments: expected at most 2, found 3
 }
index 6114c5958e095979aa83a0f7e408b81ce809a062..87c865ab618b73a019c20027667e242a9b508874 100644 (file)
 fn main() {
     // Ensure that the printed type doesn't include the default type params...
     let _: Foo<int> = ();
-    //~^ ERROR mismatched types: expected `Foo<int>` but found `()`
+    //~^ ERROR mismatched types: expected `Foo<int>`, found `()`
 
     // ...even when they're present, but the same types as the defaults.
     let _: Foo<int, B, C> = ();
-    //~^ ERROR mismatched types: expected `Foo<int>` but found `()`
+    //~^ ERROR mismatched types: expected `Foo<int>`, found `()`
 
     // Including cases where the default is using previous type params.
     let _: HashMap<String, int> = ();
-    //~^ ERROR mismatched types: expected `HashMap<collections::string::String,int>` but found `()`
+    //~^ ERROR mismatched types: expected `HashMap<collections::string::String,int>`, found `()`
     let _: HashMap<String, int, Hash<String>> = ();
-    //~^ ERROR mismatched types: expected `HashMap<collections::string::String,int>` but found `()`
+    //~^ ERROR mismatched types: expected `HashMap<collections::string::String,int>`, found `()`
 
     // But not when there's a different type in between.
     let _: Foo<A, int, C> = ();
-    //~^ ERROR mismatched types: expected `Foo<A,int>` but found `()`
+    //~^ ERROR mismatched types: expected `Foo<A,int>`, found `()`
 
     // And don't print <> at all when there's just defaults.
     let _: Foo<A, B, C> = ();
-    //~^ ERROR mismatched types: expected `Foo` but found `()`
+    //~^ ERROR mismatched types: expected `Foo`, found `()`
 }
index 1c6dd0ef9f65717d6c4b62891fa839c01eb89b0b..4a8c72c3877c52cd0a3ff6713614e211e64881a5 100644 (file)
@@ -10,5 +10,5 @@
 
 fn main() {
     let x = if true { 10i } else { 10u };
-    //~^ ERROR if and else have incompatible types: expected `int` but found `uint`
+    //~^ ERROR if and else have incompatible types: expected `int`, found `uint`
 }
index c15e28f95173999d4698b54186fe1e271b665777..c22a8e3f7829994d03d3946a8c29f3566851a50f 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()` but found `bool`
+// error-pattern:mismatched types: expected `()`, found `bool`
 
 extern crate debug;
 
index e01ec2904a684acb4b71674ea49f8134724b50ee..ec24be8bbe8d3613eda8e7d24378f9c29ec50e2e 100644 (file)
@@ -12,7 +12,7 @@
 #![feature(struct_inherit)]
 
 // With lifetime parameters.
-struct S5<'a> : S4 { //~ ERROR wrong number of lifetime parameters: expected 1 but found 0
+struct S5<'a> : S4 { //~ ERROR wrong number of lifetime parameters: expected 1, found 0
     f4: int,
 }
 
index 2f77497acc4a8d44e469085c64b719b6044d853a..1e42a9447f67a5feda876f8c507167209933b783 100644 (file)
@@ -39,62 +39,62 @@ fn id_u32(n: u32) -> u32 { n }
     fn id_u64(n: u64) -> u64 { n }
 
     id_i8(a8); // ok
-    id_i8(a16); //~ ERROR mismatched types: expected `i8` but found `i16`
-    id_i8(a32); //~ ERROR mismatched types: expected `i8` but found `i32`
-    id_i8(a64); //~ ERROR mismatched types: expected `i8` but found `i64`
+    id_i8(a16); //~ ERROR mismatched types: expected `i8`, found `i16`
+    id_i8(a32); //~ ERROR mismatched types: expected `i8`, found `i32`
+    id_i8(a64); //~ ERROR mismatched types: expected `i8`, found `i64`
 
-    id_i16(a8); //~ ERROR mismatched types: expected `i16` but found `i8`
+    id_i16(a8); //~ ERROR mismatched types: expected `i16`, found `i8`
     id_i16(a16); // ok
-    id_i16(a32); //~ ERROR mismatched types: expected `i16` but found `i32`
-    id_i16(a64); //~ ERROR mismatched types: expected `i16` but found `i64`
+    id_i16(a32); //~ ERROR mismatched types: expected `i16`, found `i32`
+    id_i16(a64); //~ ERROR mismatched types: expected `i16`, found `i64`
 
-    id_i32(a8); //~ ERROR mismatched types: expected `i32` but found `i8`
-    id_i32(a16); //~ ERROR mismatched types: expected `i32` but found `i16`
+    id_i32(a8); //~ ERROR mismatched types: expected `i32`, found `i8`
+    id_i32(a16); //~ ERROR mismatched types: expected `i32`, found `i16`
     id_i32(a32); // ok
-    id_i32(a64); //~ ERROR mismatched types: expected `i32` but found `i64`
+    id_i32(a64); //~ ERROR mismatched types: expected `i32`, found `i64`
 
-    id_i64(a8); //~ ERROR mismatched types: expected `i64` but found `i8`
-    id_i64(a16); //~ ERROR mismatched types: expected `i64` but found `i16`
-    id_i64(a32); //~ ERROR mismatched types: expected `i64` but found `i32`
+    id_i64(a8); //~ ERROR mismatched types: expected `i64`, found `i8`
+    id_i64(a16); //~ ERROR mismatched types: expected `i64`, found `i16`
+    id_i64(a32); //~ ERROR mismatched types: expected `i64`, found `i32`
     id_i64(a64); // ok
 
     id_i8(c8); // ok
-    id_i8(c16); //~ ERROR mismatched types: expected `i8` but found `i16`
-    id_i8(c32); //~ ERROR mismatched types: expected `i8` but found `i32`
-    id_i8(c64); //~ ERROR mismatched types: expected `i8` but found `i64`
+    id_i8(c16); //~ ERROR mismatched types: expected `i8`, found `i16`
+    id_i8(c32); //~ ERROR mismatched types: expected `i8`, found `i32`
+    id_i8(c64); //~ ERROR mismatched types: expected `i8`, found `i64`
 
-    id_i16(c8); //~ ERROR mismatched types: expected `i16` but found `i8`
+    id_i16(c8); //~ ERROR mismatched types: expected `i16`, found `i8`
     id_i16(c16); // ok
-    id_i16(c32); //~ ERROR mismatched types: expected `i16` but found `i32`
-    id_i16(c64); //~ ERROR mismatched types: expected `i16` but found `i64`
+    id_i16(c32); //~ ERROR mismatched types: expected `i16`, found `i32`
+    id_i16(c64); //~ ERROR mismatched types: expected `i16`, found `i64`
 
-    id_i32(c8); //~ ERROR mismatched types: expected `i32` but found `i8`
-    id_i32(c16); //~ ERROR mismatched types: expected `i32` but found `i16`
+    id_i32(c8); //~ ERROR mismatched types: expected `i32`, found `i8`
+    id_i32(c16); //~ ERROR mismatched types: expected `i32`, found `i16`
     id_i32(c32); // ok
-    id_i32(c64); //~ ERROR mismatched types: expected `i32` but found `i64`
+    id_i32(c64); //~ ERROR mismatched types: expected `i32`, found `i64`
 
-    id_i64(a8); //~ ERROR mismatched types: expected `i64` but found `i8`
-    id_i64(a16); //~ ERROR mismatched types: expected `i64` but found `i16`
-    id_i64(a32); //~ ERROR mismatched types: expected `i64` but found `i32`
+    id_i64(a8); //~ ERROR mismatched types: expected `i64`, found `i8`
+    id_i64(a16); //~ ERROR mismatched types: expected `i64`, found `i16`
+    id_i64(a32); //~ ERROR mismatched types: expected `i64`, found `i32`
     id_i64(a64); // ok
 
     id_u8(b8); // ok
-    id_u8(b16); //~ ERROR mismatched types: expected `u8` but found `u16`
-    id_u8(b32); //~ ERROR mismatched types: expected `u8` but found `u32`
-    id_u8(b64); //~ ERROR mismatched types: expected `u8` but found `u64`
+    id_u8(b16); //~ ERROR mismatched types: expected `u8`, found `u16`
+    id_u8(b32); //~ ERROR mismatched types: expected `u8`, found `u32`
+    id_u8(b64); //~ ERROR mismatched types: expected `u8`, found `u64`
 
-    id_u16(b8); //~ ERROR mismatched types: expected `u16` but found `u8`
+    id_u16(b8); //~ ERROR mismatched types: expected `u16`, found `u8`
     id_u16(b16); // ok
-    id_u16(b32); //~ ERROR mismatched types: expected `u16` but found `u32`
-    id_u16(b64); //~ ERROR mismatched types: expected `u16` but found `u64`
+    id_u16(b32); //~ ERROR mismatched types: expected `u16`, found `u32`
+    id_u16(b64); //~ ERROR mismatched types: expected `u16`, found `u64`
 
-    id_u32(b8); //~ ERROR mismatched types: expected `u32` but found `u8`
-    id_u32(b16); //~ ERROR mismatched types: expected `u32` but found `u16`
+    id_u32(b8); //~ ERROR mismatched types: expected `u32`, found `u8`
+    id_u32(b16); //~ ERROR mismatched types: expected `u32`, found `u16`
     id_u32(b32); // ok
-    id_u32(b64); //~ ERROR mismatched types: expected `u32` but found `u64`
+    id_u32(b64); //~ ERROR mismatched types: expected `u32`, found `u64`
 
-    id_u64(b8); //~ ERROR mismatched types: expected `u64` but found `u8`
-    id_u64(b16); //~ ERROR mismatched types: expected `u64` but found `u16`
-    id_u64(b32); //~ ERROR mismatched types: expected `u64` but found `u32`
+    id_u64(b8); //~ ERROR mismatched types: expected `u64`, found `u8`
+    id_u64(b16); //~ ERROR mismatched types: expected `u64`, found `u16`
+    id_u64(b32); //~ ERROR mismatched types: expected `u64`, found `u32`
     id_u64(b64); // ok
 }
index dfb38953ab397f3ef352b8368ad313c7efda49e7..0733744b65210d724ed498d24abf969b69b27dfb 100644 (file)
@@ -12,4 +12,4 @@ fn f(_: extern "Rust" fn()) {}
 extern fn bar() {}
 
 fn main() { f(bar) }
-//~^ ERROR: expected `fn()` but found `extern "C" fn()`
+//~^ ERROR: expected `fn()`, found `extern "C" fn()`
index 1d9250305ef49f9652ca480a4c65a190586f2c2a..c818b3bb26ce6a8d39dabbf2d75e50e4585a45a3 100644 (file)
@@ -10,7 +10,7 @@
 
 fn main() {
     match Some(10) {
-    //~^ ERROR match arms have incompatible types: expected `bool` but found `()`
+    //~^ ERROR match arms have incompatible types: expected `bool`, found `()`
         Some(5) => false,
         Some(2) => true,
         None    => (), //~ NOTE match arm with an incompatible type
index 4d520b570b725bd4afcd8146a27e6cb2b5dc8597..82cd38ad5b0438ab349c3bee45aaf70d105827c4 100644 (file)
@@ -14,5 +14,5 @@ struct Test<'s> {
 
 fn main() {
     let test = box Test { func: proc() {} };
-    //~^ ERROR: expected `||` but found `proc()`
+    //~^ ERROR: expected `||`, found `proc()`
 }
index f520ce0eabba6aeb020d883877d846dae14f2109..83f6fb072329d88ddc1900540bfa275e3aa09006 100644 (file)
@@ -12,6 +12,6 @@
 
 //! Test that makes sure wrongly-typed bench functions are rejected
 
-// error-pattern:expected &-ptr but found int
+// error-pattern:expected &-ptr, found int
 #[bench]
 fn bar(x: int) { }
index 2b769b9e499ea2cf11123736483987a5881c9bd1..7159aa17623c086f862dbeb3c24f91c3b274ec11 100644 (file)
@@ -12,7 +12,7 @@ fn main() {
   let x = [1,2];
   let y = match x {
     [] => None,
-//~^ ERROR expected `[<generic integer #1>, .. 2]` but found a fixed vector pattern of size 0
+//~^ ERROR expected `[<generic integer #1>, .. 2]`, found a fixed vector pattern of size 0
     [a,_] => Some(a)
   };
 }
index de1a9e13f9e86da6cd04a63c41a93e07d157205f..eee23f1feba277915c394d233d5e5699af858591 100644 (file)
@@ -16,8 +16,8 @@ fn expect_proc(_: proc()) {}
 
 fn main() {
     expect_closure(proc() {});
-    //~^ ERROR mismatched types: expected `||` but found `proc()` (expected closure, found proc)
+    //~^ ERROR mismatched types: expected `||`, found `proc()` (expected closure, found proc)
 
     expect_proc(|| {});
-    //~^ ERROR mismatched types: expected `proc()` but found `||` (expected proc, found closure)
+    //~^ ERROR mismatched types: expected `proc()`, found `||` (expected proc, found closure)
 }
index 90366d09e2deab2abbb2a8249876a0821b8f45f2..fc5a591ebd60fe3facaacc8b977b7a312cc05232 100644 (file)
@@ -16,9 +16,9 @@ struct X {
 fn main() {
     let x = X { a: [0] };
     let _f = &x.a as *mut u8;
-    //~^ ERROR mismatched types: expected `*mut u8` but found `&[u8, .. 1]`
+    //~^ ERROR mismatched types: expected `*mut u8`, found `&[u8, .. 1]`
 
     let local = [0u8];
     let _v = &local as *mut u8;
-    //~^ ERROR mismatched types: expected `*mut u8` but found `&[u8, .. 1]`
+    //~^ ERROR mismatched types: expected `*mut u8`, found `&[u8, .. 1]`
 }
index 2540c7edb0c20f4490f243e88fb8ef6279dee1dc..c9e47b74d515d925645c927c624fb5a9a1f85b78 100644 (file)
@@ -18,7 +18,7 @@ struct Shower<T> {
 
 impl<T: fmt::Show> ops::Fn<(), ()> for Shower<T> {
     fn call(&self, _args: ()) {
-//~^ ERROR `call` has an incompatible type for trait: expected "rust-call" fn but found "Rust" fn
+//~^ ERROR `call` has an incompatible type for trait: expected "rust-call" fn, found "Rust" fn
         println!("{}", self.x);
     }
 }
index db0a0487687a8623463848bbfaa0bfb8816ccb98..d4b31066e5ac216f8e0375481c9f623af2f2fde8 100644 (file)
@@ -12,6 +12,6 @@
 
 fn main() {
     let Slice { data: data, len: len } = "foo";
-    //~^ ERROR mismatched types: expected `&'static str` but found a structure pattern
+    //~^ ERROR mismatched types: expected `&'static str`, found a structure pattern
 }
 
index 79a824bbf69215872dabfcae9b990a1b22403af7..bece4381e4183e83425f56936897a8e8f9142b5d 100644 (file)
@@ -13,7 +13,7 @@
 fn main() {
     match () {
         Slice { data: data, len: len } => (),
-        //~^ ERROR mismatched types: expected `()` but found a structure pattern
+        //~^ ERROR mismatched types: expected `()`, found a structure pattern
         _ => unreachable!()
     }
 }
index ce5a5a09e4866114d46bee6cad8a1c80284e16ef..6bdcf5c5edced68d52077d9f5a3c5138e091a283 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:expected `[` but found `vec`
+// error-pattern:expected `[`, found `vec`
 mod blade_runner {
     #vec[doc(
         brief = "Blade Runner is probably the best movie ever",
index d979afbc55ceb09bdfc49dd8828a5fde387edd53..694bf05b21035b432e2a9c5e1a41138fae96d502 100644 (file)
@@ -10,7 +10,7 @@
 
 fn foo<T, U>(x: T, y: U) {
     let mut xx = x;
-    xx = y; //~ ERROR expected `T` but found `U`
+    xx = y; //~ ERROR expected `T`, found `U`
 }
 
 fn main() {
index 45b4ab1871dc944a2d2a4853bf09f733c2b367c2..5f56f6b8b6b99fbb17b90a9fcf0494b8d5f0ff8e 100644 (file)
@@ -13,4 +13,4 @@
 fn main()
 {
     let x = 3
-} //~ ERROR: expected `;` but found `}`
+} //~ ERROR: expected `;`, found `}`
index df9af9c6bcca162c1c059176b75e245d2c90fc54..798a8cfec9a6e202bd1e194e74c2ca53a479d836 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    let _p: char = 100; //~ ERROR mismatched types: expected `char` but found
+    let _p: char = 100; //~ ERROR mismatched types: expected `char`, found
 }
index 02c619f5f36cc2df6251ec241de24c2b0541ab1a..96a93c205feb7c1648d0288c4172e23b22599553 100644 (file)
@@ -12,6 +12,6 @@ fn main() {
     match None {
         Err(_) => ()
         //~^ ERROR mismatched types: expected `core::option::Option<<generic #1>>`
-        //         but found `core::result::Result<<generic #2>,<generic #3>>`
+        //         , found `core::result::Result<<generic #2>,<generic #3>>`
     }
 }
index b90a7f233b6d4cf3ed618df86853f10d0baf0902..d80f2d1263d997e7ca7ab833dc3b5cadb2b39647 100644 (file)
@@ -13,6 +13,6 @@ fn bar(int_param: int) {}
 fn main() {
     let foo: [u8, ..4] = [1u8, ..4u];
     bar(foo);
-    //~^ ERROR mismatched types: expected `int` but found `[u8, .. 4]`
-    //         (expected int but found vector)
+    //~^ ERROR mismatched types: expected `int`, found `[u8, .. 4]`
+    //         (expected int, found vector)
 }
index ec1f62c33fcbb7648b204766c59b48d2dfe0dd0e..220fb76411abbb51b0caec0d4becb0b5d21c448a 100644 (file)
@@ -13,6 +13,6 @@
 static A: (int,int) = (4,2);
 fn main() {
     match 42 { A => () }
-    //~^ ERROR mismatched types: expected `<generic integer #0>` but found `(int,int)`
-    //         (expected integral variable but found tuple)
+    //~^ ERROR mismatched types: expected `<generic integer #0>`, found `(int,int)`
+    //         (expected integral variable, found tuple)
 }
index 6734a546be5fbc9371417109d774fc3d913a20a8..5c4127c5bae5ecb970b42fae4bdfcf3d5d155a1a 100644 (file)
@@ -12,33 +12,33 @@ enum A { B, C }
 
 fn main() {
     match (true, false) {
-        B => (), //~ ERROR expected `(bool,bool)` but found an enum or structure pattern
+        B => (), //~ ERROR expected `(bool,bool)`, found an enum or structure pattern
         _ => ()
     }
 
     match (true, false) {
         (true, false, false) => ()
-        //~^ ERROR mismatched types: expected `(bool,bool)` but found tuple
-        //         (expected a tuple with 2 elements but found one with 3 elements)
+        //~^ ERROR mismatched types: expected `(bool,bool)`, found tuple
+        //         (expected a tuple with 2 elements, found one with 3 elements)
     }
 
     match (true, false) {
         box (true, false) => ()
-        //~^ ERROR mismatched types: expected `(bool,bool)` but found a box pattern
+        //~^ ERROR mismatched types: expected `(bool,bool)`, found a box pattern
     }
 
     match (true, false) {
         &(true, false) => ()
-        //~^ ERROR mismatched types: expected `(bool,bool)` but found an `&`-pointer pattern
+        //~^ ERROR mismatched types: expected `(bool,bool)`, found an `&`-pointer pattern
     }
 
 
-    let v = [('a', 'b')   //~ ERROR expected function but found `(char,char)`
+    let v = [('a', 'b')   //~ ERROR expected function, found `(char,char)`
              ('c', 'd'),
              ('e', 'f')];
 
     for &(x,y) in v.iter() {} // should be OK
 
     // Make sure none of the errors above were fatal
-    let x: char = true; //~ ERROR expected `char` but found `bool`
+    let x: char = true; //~ ERROR expected `char`, found `bool`
 }
index 326d2e1c852822cab966399a43d1518deccb71e5..de715902f2a3db8f89ed37d37921b97fd43d4dbd 100644 (file)
@@ -13,7 +13,7 @@ enum Either<T, U> { Left(T), Right(U) }
 
 fn main() {
     match S(Left(5)) {
-        Right(_) => {}  //~ ERROR mismatched types: expected `S` but found `Either
+        Right(_) => {}  //~ ERROR mismatched types: expected `S`, found `Either
         _ => {}
     }
 }
index f90833a852b13b6fbc18ca8a765bdb3c7780150e..166e91b27ac132e684910994c245a4a742c3a05f 100644 (file)
@@ -8,6 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-trait Foo { fn a() } //~ ERROR expected `;` or `{` but found `}`
+trait Foo { fn a() } //~ ERROR expected `;` or `{`, found `}`
 
 fn main() {}
index 99035c8906b702747ae94198f5ed73b7aba66f7a..a9e9416beb390c941d92c75f11bc38e3787923c8 100644 (file)
@@ -15,7 +15,7 @@
 
 impl<'a> BarStruct {
     fn foo(&'a mut self) -> Gc<BarStruct> { self }
-    //~^ ERROR: error: mismatched types: expected `Gc<BarStruct>` but found `&'a mut BarStruct
+    //~^ ERROR: error: mismatched types: expected `Gc<BarStruct>`, found `&'a mut BarStruct
 }
 
 fn main() {}
index 4b1c67918745ac29cf4a0ecfc6bc82571b21dc23..8b3df6f9f95e2aeef5c420788e93afcf06f0b432 100644 (file)
@@ -14,7 +14,7 @@ enum Whatever {
 fn foo(x: Whatever) {
     match x {
         Some(field) => field.access(),
-        //~^ ERROR: mismatched types: expected `Whatever` but found
+        //~^ ERROR: mismatched types: expected `Whatever`, found
     }
 }
 
index 183965f099cf14c2eb0d782b0a700f2748d859f4..27369f77e883b41c190e8cc74af995fa6ea35784 100644 (file)
@@ -10,9 +10,9 @@
 
 enum Foo {
     A = 1i64,
-    //~^ ERROR mismatched types: expected `int` but found `i64`
+    //~^ ERROR mismatched types: expected `int`, found `i64`
     B = 2u8
-    //~^ ERROR mismatched types: expected `int` but found `u8`
+    //~^ ERROR mismatched types: expected `int`, found `u8`
 }
 
 fn main() {}
index 07197bd3f3cae5b788800719681803efb5176837..227ed3fb83420d059057916a3ff82d7f0c77be38 100644 (file)
@@ -14,8 +14,8 @@ fn bar(_s: u32) { }
 
 fn main() {
     foo(1*(1 as int));
-    //~^ ERROR: mismatched types: expected `i16` but found `int` (expected `i16` but found `int`)
+    //~^ ERROR: mismatched types: expected `i16`, found `int` (expected `i16`, found `int`)
 
     bar(1*(1 as uint));
-    //~^ ERROR: mismatched types: expected `u32` but found `uint` (expected `u32` but found `uint`)
+    //~^ ERROR: mismatched types: expected `u32`, found `uint` (expected `u32`, found `uint`)
 }
index 0a9d9fb20ab0e88a668d9f9c6f981a1d99f4c341..d0e5249305493523ad48208d5ffbf2ddc5d58a4f 100644 (file)
@@ -14,7 +14,7 @@ fn forever() -> ! {
   loop {
     break;
   }
-  return 42i; //~ ERROR expected `!` but found `int`
+  return 42i; //~ ERROR expected `!`, found `int`
 }
 
 fn main() {
index 6f3b8bd421f86e3585e9b1346447e201ef6104e3..75f7b5d4dd80937110037b3fcdca25cedd2af066 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() {
-    foo! bar < //~ ERROR expected `(` or `{`, but found `<`
+    foo! bar < //~ ERROR expected `(` or `{`, found `<`
 }
index 4956528856b66d3c85d25f10fbdd01f0b1e58b82..2491d0b3769759f0ce9f29310f9252d966c29f29 100644 (file)
@@ -14,7 +14,7 @@ enum E { C(int) }
 
 fn main() {
     match (S { a: 1 }) {
-        C(_) => (), //~ ERROR mismatched types: expected `S` but found `E`
+        C(_) => (), //~ ERROR mismatched types: expected `S`, found `E`
         _ => ()
     }
 }
index c3a06aa0e2c274184bcb213d041454cd61d9f062..fee49ad8fdb0614bf6fa034f751acebc9bd4c6d2 100644 (file)
@@ -10,6 +10,6 @@
 
 fn main() {
     match () {
-        [()] => { } //~ ERROR mismatched types: expected `()` but found a vector pattern
+        [()] => { } //~ ERROR mismatched types: expected `()`, found a vector pattern
     }
 }
index c7b0bc8822be1dfda61e88f2fb02eed62226f10e..795e3807d5ec67aa13df29d410e55f8da199d51e 100644 (file)
@@ -12,7 +12,7 @@ struct S {
  y: int
 }
 
-impl Cmp, ToString for S { //~ ERROR: expected `{` but found `,`
+impl Cmp, ToString for S { //~ ERROR: expected `{`, found `,`
   fn eq(&&other: S) { false }
   fn to_string(&self) -> String { "hi".to_string() }
 }
index d9cdae4a4995fd5b5a6ebd780aab635f184c65e7..a33a603f7f564beb888570cbe2d3468b2c1f3168 100644 (file)
@@ -12,5 +12,5 @@
 
 pub fn main() {
     struct Foo { x: int }
-    let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected `;` but found `{`
+    let mut Foo { x: x } = Foo { x: 3 }; //~ ERROR: expected `;`, found `{`
 }
index 508fec069c13e3d5590d8bb24d1da097e846d015..7e113d4a8c4cd49b40ff36a4de763b128d483f26 100644 (file)
@@ -18,5 +18,5 @@ fn main() {
     // because the def_id associated with the type was
     // not convertible to a path.
   let x: int = noexporttypelib::foo();
-    //~^ ERROR expected `int` but found `core::option::Option<int>`
+    //~^ ERROR expected `int`, found `core::option::Option<int>`
 }
index fd857129c35690e0371ee8e21109fb4ed44d3024..c4d5d734a71953383f066325d5913dac2df45fc7 100644 (file)
@@ -12,5 +12,5 @@ enum State { ST_NULL, ST_WHITESPACE }
 
 fn main() {
     [ST_NULL, ..(ST_WHITESPACE as uint)];
-    //~^ ERROR expected constant integer for repeat count but found variable
+    //~^ ERROR expected constant integer for repeat count, found variable
 }
index 41ea0c88e0743a3101521610e25e90b02758ca77..299e9d3dced3c0fb963153aa6f0cad0f70c7c50a 100644 (file)
@@ -12,6 +12,6 @@
 
 fn main() {
     fn bar(n: uint) {
-        let _x = [0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
+        let _x = [0, ..n]; //~ ERROR expected constant integer for repeat count, found variable
     }
 }
index fcbfb115af7567930ae23691fe297170e9d76560..c5ff885997b729bfcd5014890dc5b38958d9e936 100644 (file)
@@ -8,5 +8,5 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn foo(x) { //~ ERROR expected `:` but found `)`
+fn foo(x) { //~ ERROR expected `:`, found `)`
 }
index 47d0a226a56ac5c1a11a731e5a21a031e168c7f8..01feda34e0870a5cc98f0079189669f0459d3dd7 100644 (file)
@@ -29,9 +29,9 @@ fn main() {
         _ => ()
     }
     match 'c' {
-        S { .. } => (),   //~ ERROR mismatched types: expected `char` but found a structure pattern
+        S { .. } => (),   //~ ERROR mismatched types: expected `char`, found a structure pattern
 
         _ => ()
     }
-    f(true);            //~ ERROR mismatched types: expected `char` but found `bool`
+    f(true);            //~ ERROR mismatched types: expected `char`, found `bool`
 }
index 79f0cc352e4e708b7e91bbf7d97532c1dd92e611..4de56e32f560a98ba7dbb34e459bede38f950d01 100644 (file)
@@ -12,8 +12,8 @@ fn let_in<T>(x: T, f: |T|) {}
 
 fn main() {
     let_in(3u, |i| { assert!(i == 3i); });
-    //~^ ERROR expected `uint` but found `int`
+    //~^ ERROR expected `uint`, found `int`
 
     let_in(3i, |i| { assert!(i == 3u); });
-    //~^ ERROR expected `int` but found `uint`
+    //~^ ERROR expected `int`, found `uint`
 }
index 3e161041711db59d285c88a68d700fa8d5637d8b..4f3fb7d5b8ab28d55bf1565650e0a06300453fe3 100644 (file)
@@ -10,5 +10,5 @@
 
 static s: &'static str =
     r#"
-      "## //~ ERROR expected `;` but found `#`
+      "## //~ ERROR expected `;`, found `#`
 ;
index 5ef043634fbe344f4252acf3ba3f4ca0fbe1d10f..68e198ea5b7a070f8efca32169eb3bec80b48042 100644 (file)
 struct a_class<'a> { x:&'a int }
 
 fn a_fn1<'a,'b>(e: an_enum<'a>) -> an_enum<'b> {
-    return e; //~ ERROR mismatched types: expected `an_enum<'b>` but found `an_enum<'a>`
+    return e; //~ ERROR mismatched types: expected `an_enum<'b>`, found `an_enum<'a>`
     //~^ ERROR cannot infer
 }
 
 fn a_fn3<'a,'b>(e: a_class<'a>) -> a_class<'b> {
-    return e; //~ ERROR mismatched types: expected `a_class<'b>` but found `a_class<'a>`
+    return e; //~ ERROR mismatched types: expected `a_class<'b>`, found `a_class<'a>`
     //~^ ERROR cannot infer
 }
 
index 87820e88475049342175e76f6de19d66516097eb..519223e97535e58e06bfdbf03de6ea3317c945a5 100644 (file)
@@ -32,7 +32,7 @@ fn set_f_ok(&self, b: Gc<b<'a>>) {
     }
 
     fn set_f_bad(&self, b: Gc<b>) {
-        self.f = b; //~ ERROR mismatched types: expected `Gc<Gc<&'a int>>` but found `Gc<Gc<&int>>`
+        self.f = b; //~ ERROR mismatched types: expected `Gc<Gc<&'a int>>`, found `Gc<Gc<&int>>`
         //~^ ERROR cannot infer
     }
 }
index d969a7d2663fc681bd0a8350a130f37f0ac22f2c..772ccadda52730e9cb08a5d934bb9bfb56945c49 100644 (file)
@@ -40,7 +40,7 @@ trait set_foo_foo {
 
 impl<'a> set_foo_foo for with_foo<'a> {
     fn set_foo(&mut self, f: @foo) {
-        self.f = f; //~ ERROR mismatched types: expected `@foo/&self` but found `@foo/&`
+        self.f = f; //~ ERROR mismatched types: expected `@foo/&self`, found `@foo/&`
     }
 }
 
index 9222fde7789ee7bc6ac91034ffde997972046019..78d84fb7c757dfc315213d38f02ea7e427a98405 100644 (file)
@@ -26,7 +26,7 @@ trait get_ctxt<'a> {
 }
 
 fn make_gc1(gc: @get_ctxt<'a>) -> @get_ctxt<'b>  {
-    return gc; //~ ERROR mismatched types: expected `@get_ctxt/&b` but found `@get_ctxt/&a`
+    return gc; //~ ERROR mismatched types: expected `@get_ctxt/&b`, found `@get_ctxt/&a`
 }
 
 struct Foo {
index c5c8aa043f38f9bb9eeb0d9a366c3c1631d79df5..a726e30b1de59500df552819be3f73d807a7d566 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type closure = Box<lt/fn()>; //~ ERROR expected `,` but found `/`
+type closure = Box<lt/fn()>; //~ ERROR expected `,`, found `/`
index a87f62189417fc3a714f102537028afa55cd77e2..841c1ec59fdaad236375088866e248abba250c27 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-const i: int = 42; //~ ERROR expected item but found `const`
+const i: int = 42; //~ ERROR expected item, found `const`
index e40ed28e93fa340a5a00d50d6acd582a3d8204de..b9c9c5f0a537bd4b98437f311ecbb60dd70cf684 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-enum e = int; //~ ERROR expected `{` but found `=`
+enum e = int; //~ ERROR expected `{`, found `=`
index 48b0f008d2227e9aa3d6fb3bcfcd9428cfea21ca..2b76db4f160a46bca219d703e314ae69f35d0037 100644 (file)
@@ -11,5 +11,5 @@
 struct s {
     let foo: (),
     //~^  ERROR found `let` in ident position
-    //~^^ ERROR expected `:` but found `foo`
+    //~^^ ERROR expected `:`, found `foo`
 }
index 3efcf996f93cbadd25bee0f8b4a64eefa7049696..9bb3c649cdfe22a7d4f557dc50886f1d1f5ed945 100644 (file)
@@ -10,5 +10,5 @@
 
 struct s {
     bar: ();
-    //~^ ERROR expected `,`, or `}` but found `;`
+    //~^ ERROR expected `,`, or `}`, found `;`
 }
index b85880f198174876a48917dfd20affb6a18ca8ad..917b4e03ad0ed8d3339fc8b4ad9e6b5c67660684 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type v = [int * 3]; //~ ERROR expected `]` but found `*`
+type v = [int * 3]; //~ ERROR expected `]`, found `*`
index 865b5f7ad8b9b16af6474244618c49647214dadd..d569ea25c46a754a0907b0fb335711bf35d750eb 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-pure fn f() {} //~ ERROR expected item but found `pure`
+pure fn f() {} //~ ERROR expected item, found `pure`
index 4f21769fe25e6494cadee60464699d06e8bb89d2..83ebe7cc7a3bda8ce9bd128fec6fea3c17890cf2 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn f() {
-    let x: fn~() = || (); //~ ERROR expected `(` but found `~`
+    let x: fn~() = || (); //~ ERROR expected `(`, found `~`
 }
index 4f615af7c1ca493806f5c8000a1bd065c425dbf8..b2e856750df0156b4c0ad40c7eebea06358c1f46 100644 (file)
@@ -11,5 +11,5 @@
 fn removed_moves() {
     let mut x = 0;
     let y <- x;
-    //~^ ERROR expected `;` but found `<-`
+    //~^ ERROR expected `;`, found `<-`
 }
index af49f204e9788374b537401932055e3811caf2f5..e39fbe0f950ec29695344ae5a63e2bd782978eea 100644 (file)
@@ -12,5 +12,5 @@ fn removed_moves() {
     let mut x = 0;
     let y = 0;
     y <- x;
-    //~^ ERROR expected one of `;`, `}` but found `<-`
+    //~^ ERROR expected one of `;`, `}`, found `<-`
 }
index 171cf03f7114190b51716a3e51f76213a3c15340..9f0cc0107c1f8c48c8a0085f3a12cfbbe084f150 100644 (file)
@@ -11,5 +11,5 @@
 fn f() {
     let v = [mut 1, 2, 3, 4];
     //~^  ERROR found `mut` in ident position
-    //~^^ ERROR expected `]` but found `1`
+    //~^^ ERROR expected `]`, found `1`
 }
index 4c0be562f9254ce16ed78795f2e09e10ba31818d..912952892e4f72e02327649aaa44f3f9ea388122 100644 (file)
@@ -10,4 +10,4 @@
 
 type v = [mut int];
     //~^  ERROR found `mut` in ident position
-    //~^^ ERROR expected `]` but found `int`
+    //~^^ ERROR expected `]`, found `int`
index 5b969da4fd22f8bb5539441f47034eb9f5081340..0468ddd389a7c494b69db763ae102ae23c17be27 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-type bptr = &lifetime/int; //~ ERROR expected `;` but found `/`
+type bptr = &lifetime/int; //~ ERROR expected `;`, found `/`
index 5603cd21f3b3119fc7a854ca04bcde6c69ce31c8..f4fc5b696fa4b6fa1d837c3e99c008693fb8c3f3 100644 (file)
@@ -11,5 +11,5 @@
 fn f() {
     let a_box = box mut 42;
     //~^  ERROR found `mut` in ident position
-    //~^^ ERROR expected `;` but found `42`
+    //~^^ ERROR expected `;`, found `42`
 }
index 128dbbd9cabfc6dc37039db39ad07f7d22fc03d7..a3fc27d8cf2e0f83b38ba7a64b6b0cf20f9723a5 100644 (file)
@@ -10,4 +10,4 @@
 
 type mut_box = Box<mut int>;
     //~^  ERROR found `mut` in ident position
-    //~^^ ERROR expected `,` but found `int`
+    //~^^ ERROR expected `,`, found `int`
index a0a332af6f6479a266a0c5ff1384a72834f9dcfa..fd8cdb7b10edf51c380a4f91ca9879d255cada0f 100644 (file)
@@ -16,5 +16,5 @@ struct S {
 
     let a = S { foo: (), bar: () };
     let b = S { foo: () with a };
-    //~^ ERROR expected one of `,`, `}` but found `with`
+    //~^ ERROR expected one of `,`, `}`, found `with`
 }
index 3068c5804c8ecaba1d25dc8447fed778c910a1a0..83c6897dee31175d9f7cbc105ddb4bdb1ba880f2 100644 (file)
@@ -16,5 +16,5 @@ struct S {
 
     let a = S { foo: (), bar: () };
     let b = S { foo: (), with a };
-    //~^ ERROR expected `:` but found `a`
+    //~^ ERROR expected `:`, found `a`
 }
index e19c1921a90005cf1906ff3c9b97b200914201e7..8a28819a7365acfda6b4e2b72d2ea177ae2b5ffb 100644 (file)
 
 fn main() {
     let n = 1;
-    let a = [0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
-    let b = [0, ..()]; //~ ERROR expected positive integer for repeat count but found ()
-    //~^ ERROR: expected `uint` but found `()`
-    let c = [0, ..true]; //~ ERROR expected positive integer for repeat count but found boolean
-    //~^ ERROR: expected `uint` but found `bool`
-    let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count but found float
-    //~^ ERROR: expected `uint` but found `<generic float #0>`
-    let e = [0, .."foo"]; //~ ERROR expected positive integer for repeat count but found string
-    //~^ ERROR: expected `uint` but found `&'static str`
+    let a = [0, ..n]; //~ ERROR expected constant integer for repeat count, found variable
+    let b = [0, ..()]; //~ ERROR expected positive integer for repeat count, found ()
+    //~^ ERROR: expected `uint`, found `()`
+    let c = [0, ..true]; //~ ERROR expected positive integer for repeat count, found boolean
+    //~^ ERROR: expected `uint`, found `bool`
+    let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count, found float
+    //~^ ERROR: expected `uint`, found `<generic float #0>`
+    let e = [0, .."foo"]; //~ ERROR expected positive integer for repeat count, found string
+    //~^ ERROR: expected `uint`, found `&'static str`
     let f = [0, ..-4];
-    //~^ ERROR expected positive integer for repeat count but found negative integer
+    //~^ ERROR expected positive integer for repeat count, found negative integer
     let f = [0u, ..-1];
-    //~^ ERROR expected positive integer for repeat count but found negative integer
+    //~^ ERROR expected positive integer for repeat count, found negative integer
 }
index 6e5dc7cc102ccca1f78ea9a9b124bb4a49e1ff71..aebe78b18e04713ce30260ff4c4351074446c68d 100644 (file)
@@ -13,7 +13,7 @@
 fn main() {
     match Foo(1.1) {
         1 => {}
-        //~^ ERROR expected `Foo<<generic float #0>,<generic #2>>` but found `<generic integer #0>`
+        //~^ ERROR expected `Foo<<generic float #0>,<generic #2>>`, found `<generic integer #0>`
     }
 
 }
index adda356298d9f1782658bae0dc300743360f5aa8..af6fc64535149a519b313d6a868fe5137c08d957 100644 (file)
@@ -12,11 +12,11 @@ struct Foo { a: int, b: int }
 struct Bar { x: int }
 
 static bar: Bar = Bar { x: 5 };
-static foo: Foo = Foo { a: 2, ..bar }; //~ ERROR mismatched types: expected `Foo` but found `Bar`
+static foo: Foo = Foo { a: 2, ..bar }; //~ ERROR mismatched types: expected `Foo`, found `Bar`
 static foo_i: Foo = Foo { a: 2, ..4 }; //~ ERROR mismatched types: expected `Foo`
 
 fn main() {
     let b = Bar { x: 5 };
-    let f = Foo { a: 2, ..b }; //~ ERROR mismatched types: expected `Foo` but found `Bar`
+    let f = Foo { a: 2, ..b }; //~ ERROR mismatched types: expected `Foo`, found `Bar`
     let f_i = Foo { a: 2, ..4 }; //~ ERROR mismatched types: expected `Foo`
 }
index 2c8bbee783bd3e409253f0d3f5a7fec7165f42e2..a0a481401bd214e5bf65b68f430093944ab878c8 100644 (file)
@@ -24,25 +24,25 @@ struct Pair<T,U> {
 
 fn main() {
     let pt = PointF {
-        //~^ ERROR expected f32 but found int
+        //~^ ERROR expected f32, found int
         x: 1i,
         y: 2i,
     };
 
     let pt2 = Point::<f32> {
-        //~^ ERROR expected f32 but found int
+        //~^ ERROR expected f32, found int
         x: 3i,
         y: 4i,
     };
 
     let pair = PairF {
-        //~^ ERROR expected f32 but found int
+        //~^ ERROR expected f32, found int
         x: 5i,
         y: 6i,
     };
 
     let pair2 = PairF::<int> {
-        //~^ ERROR expected f32 but found int
+        //~^ ERROR expected f32, found int
         x: 7i,
         y: 8i,
     };
index e40bca58bad75f0f25ae5734febb80de564e5c90..f13aabe52594aef923b37ef2b3d63ed0b0ffdda8 100644 (file)
@@ -9,6 +9,6 @@
 // except according to those terms.
 
 fn main() {
-    let (x, y) = (); //~ ERROR expected `()` but found tuple (types differ)
+    let (x, y) = (); //~ ERROR expected `()`, found tuple (types differ)
     return x;
 }
index 72b4153be2c5a1b18ed686d1e4602aaa08b472dc..9615e32bb1acf28f88ff00da9d2907467393bfe0 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `char` but found
+// error-pattern:mismatched types: expected `char`, found
 // Issue #876
 
 #![no_implicit_prelude]
index 6474a58c1cdb98a5b53691974989c42d32c10c26..88da7bc854201011056e68a802c4eff5d6e5b234 100644 (file)
@@ -20,7 +20,7 @@ struct bar {
 
 fn want_foo(f: foo) {}
 fn have_bar(b: bar) {
-    want_foo(b); //~ ERROR (expected struct foo but found struct bar)
+    want_foo(b); //~ ERROR (expected struct foo, found struct bar)
 }
 
 fn main() {}
index c8059abfd74d4530e8c8077d20b515e4e049f1cc..0817d7c610ad1987297b88130ab615a16a82d8c7 100644 (file)
@@ -20,7 +20,7 @@ struct foo {
 
 fn want_foo(f: foo) {}
 fn have_bar(b: bar) {
-    want_foo(b); //~ ERROR (expected struct foo but found Gc-ptr)
+    want_foo(b); //~ ERROR (expected struct foo, found Gc-ptr)
 }
 
 fn main() {}
index 7c4b633fa9e2d100f8cbd538ea843574f3177740..55e5a02cfaebf070948179155a3dd8954b3c3e38 100644 (file)
@@ -25,7 +25,7 @@ fn f(&self, x: &'static str) {
 
 fn main() {
     let s: Box<Trait<int>> = box Struct { person: "Fred" };
-    //~^ ERROR expected Trait<int>, but found Trait<&'static str>
-    //~^^ ERROR expected Trait<int>, but found Trait<&'static str>
+    //~^ ERROR expected Trait<int>, found Trait<&'static str>
+    //~^^ ERROR expected Trait<int>, found Trait<&'static str>
     s.f(1);
 }
index 216da08a80f7fe06eed90a5dba30a233790ecbf4..bd844cc58603eed2554c87bbbafe29f468deb764 100644 (file)
@@ -18,7 +18,7 @@ trait Mumbo {
 impl Mumbo for uint {
     // Cannot have a larger effect than the trait:
     unsafe fn jumbo(&self, x: Gc<uint>) { *self + *x; }
-    //~^ ERROR expected normal fn but found unsafe fn
+    //~^ ERROR expected normal fn, found unsafe fn
 }
 
 fn main() {}
index 677c4943043faa61582dfeb57d35fd68230a8d11..27d272c9f319b4e6f9485a2e2f8eaff7597b5e8f 100644 (file)
@@ -14,5 +14,5 @@ fn first((value, _): (int, f64)) -> int { value }
 
 fn main() {
     let y = first ((1,2,3));
-    //~^ ERROR expected a tuple with 2 elements but found one with 3 elements
+    //~^ ERROR expected a tuple with 2 elements, found one with 3 elements
 }
index d92aa8d640ab5a849cf74e51fb8101e73ec533be..c1be54b3f75e1256d94b3e911eb876caf61e031d 100644 (file)
@@ -17,9 +17,9 @@ fn identity_u16(n: u16) -> u16 { n }
 
     identity_u8(x);  // after this, `x` is assumed to have type `u8`
     identity_u16(x);
-    //~^ ERROR mismatched types: expected `u16` but found `u8`
+    //~^ ERROR mismatched types: expected `u16`, found `u8`
     identity_u16(y);
-    //~^ ERROR mismatched types: expected `u16` but found `i32`
+    //~^ ERROR mismatched types: expected `u16`, found `i32`
 
     let a = 3i;
 
@@ -27,6 +27,6 @@ fn identity_i(n: int) -> int { n }
 
     identity_i(a); // ok
     identity_u16(a);
-    //~^ ERROR mismatched types: expected `u16` but found `int`
+    //~^ ERROR mismatched types: expected `u16`, found `int`
 
 }
index da8478de98585e2d5ef701a44f226042b7926f84..e1a29afa737c8c43d13a8fc6e739efd7fc97c2c9 100644 (file)
@@ -11,6 +11,6 @@
 // Test that we print out the names of type parameters correctly in
 // our error messages.
 
-fn foo<Foo, Bar>(x: Foo) -> Bar { x } //~ ERROR expected `Bar` but found `Foo`
+fn foo<Foo, Bar>(x: Foo) -> Bar { x } //~ ERROR expected `Bar`, found `Foo`
 
 fn main() {}
index 955efeef30d79ddb5e84de6048ffb32074908bfd..4143d9d9b849a1f73fd0570ea4a526502a9d1c78 100644 (file)
@@ -15,12 +15,12 @@ trait Tr<T> {
 // these compile as if Self: Tr<U>, even tho only Self: Tr<Self or T>
 trait A:    Tr<Self> {
     fn test<U>(u: U) -> Self {
-        Tr::op(u)   //~ ERROR expected Tr<U>, but found Tr<Self>
+        Tr::op(u)   //~ ERROR expected Tr<U>, found Tr<Self>
     }
 }
 trait B<T>: Tr<T> {
     fn test<U>(u: U) -> Self {
-        Tr::op(u)   //~ ERROR expected Tr<U>, but found Tr<T>
+        Tr::op(u)   //~ ERROR expected Tr<U>, found Tr<T>
     }
 }
 
index fae4f541b1790f829a156dfe42f804f912141cf2..0f9cfab7b8aeb74ecc93339b561b4eeb216fc655 100644 (file)
@@ -17,5 +17,5 @@ struct Foo<'a, T> {
 
 pub fn main() {
     let c: Foo<_, _> = Foo { r: &5u };
-    //~^ ERROR wrong number of type arguments: expected 1 but found 2
+    //~^ ERROR wrong number of type arguments: expected 1, found 2
 }
index e879ddb951fb7cb7e806cfd800a33f8ef18da935..e9671b353b984b091779a7571e6083443f7504fb 100644 (file)
@@ -17,5 +17,5 @@ struct Foo<'a, T> {
 
 pub fn main() {
     let c: Foo<_, uint> = Foo { r: &5 };
-    //~^ ERROR wrong number of type arguments: expected 1 but found 2
+    //~^ ERROR wrong number of type arguments: expected 1, found 2
 }
index f7e5964fa2450da2db3f2d8bec82d5559479e474..29d32b10539100bc9808860606e8e9067b3f2798 100644 (file)
@@ -19,11 +19,11 @@ pub fn main() {
 
 fn test1() {
     let x: Foo<_> = Bar::<uint>;
-    //~^ ERROR mismatched types: expected `Foo<<generic #0>>` but found `Bar<uint>`
+    //~^ ERROR mismatched types: expected `Foo<<generic #0>>`, found `Bar<uint>`
     let y: Foo<uint> = x;
 }
 
 fn test2() {
     let x: Foo<_> = Bar::<uint>;
-    //~^ ERROR mismatched types: expected `Foo<<generic #0>>` but found `Bar<uint>`
+    //~^ ERROR mismatched types: expected `Foo<<generic #0>>`, found `Bar<uint>`
 }
index d5c2bbb21cad65c137c45168e32a00bf2ee5d52f..43db4dfd395b059e1cbd835d653a1f28b28928ab 100644 (file)
@@ -10,7 +10,7 @@
 
 // Test syntax checks for `type` keyword.
 
-struct S1 for type; //~ ERROR expected `{`, `(`, or `;` after struct name but found `for`
+struct S1 for type; //~ ERROR expected `{`, `(`, or `;` after struct name, found `for`
 
 pub fn main() {
 }
index 2110d4c80095a79f0dc5cd67eb2382e296caf2cb..17a17dcdcf8d6c5119769ec98dffc389b7e1c57e 100644 (file)
@@ -25,13 +25,13 @@ fn main() {
 
         let x: unsafe extern "C" fn(f: int, x: u8) = foo;
         //~^ ERROR: mismatched types: expected `unsafe extern "C" fn(int, u8)`
-        //          but found `unsafe extern "C" fn(int, u8, ...)`
-        //          (expected non-variadic fn but found variadic function)
+        //         , found `unsafe extern "C" fn(int, u8, ...)`
+        //          (expected non-variadic fn, found variadic function)
 
         let y: unsafe extern "C" fn(f: int, x: u8, ...) = bar;
         //~^ ERROR: mismatched types: expected `unsafe extern "C" fn(int, u8, ...)`
-        //          but found `extern "C" extern fn(int, u8)`
-        //          (expected variadic fn but found non-variadic function)
+        //         , found `extern "C" extern fn(int, u8)`
+        //          (expected variadic fn, found non-variadic function)
 
         foo(1, 2, 3f32); //~ ERROR: can't pass an f32 to variadic function, cast to c_double
         foo(1, 2, true); //~ ERROR: can't pass bool to variadic function, cast to c_int
index bb30715f75e598466db6233ed2d195a962a8af8a..e3aed148a2390bec92904898674d7efd1f8b634b 100644 (file)
@@ -20,7 +20,7 @@ struct Vec1 {
 // Expecting ref in input signature
 impl Mul<f64, Vec1> for Vec1 {
     fn mul(&self, s: f64) -> Vec1 {
-    //~^ ERROR: method `mul` has an incompatible type for trait: expected &-ptr but found f64
+    //~^ ERROR: method `mul` has an incompatible type for trait: expected &-ptr, found f64
         Vec1 {
             x: self.x * s
         }
@@ -35,7 +35,7 @@ struct Vec2 {
 // Wrong type parameter ordering
 impl Mul<Vec2, f64> for Vec2 {
     fn mul(&self, s: f64) -> Vec2 {
-    //~^ ERROR: method `mul` has an incompatible type for trait: expected &-ptr but found f64
+    //~^ ERROR: method `mul` has an incompatible type for trait: expected &-ptr, found f64
         Vec2 {
             x: self.x * s,
             y: self.y * s
@@ -52,7 +52,7 @@ struct Vec3 {
 // Unexpected return type
 impl Mul<f64, i32> for Vec3 {
     fn mul(&self, s: &f64) -> f64 {
-    //~^ ERROR: method `mul` has an incompatible type for trait: expected i32 but found f64
+    //~^ ERROR: method `mul` has an incompatible type for trait: expected i32, found f64
         *s
     }
 }
index 295af0964b41c951f797f075ce06060314e33994..31802dd9f06a065683fd407f2a44c69c67313e6c 100644 (file)
@@ -65,6 +65,6 @@ fn main() {
 
         // positive test so that this test will be updated when the
         // compiler changes.
-        assert!(err.as_slice().contains("expected item but found"))
+        assert!(err.as_slice().contains("expected item, found"))
     }
 }
index a0a800e08906dc134f9a597873f80c851b03ca00..d4b77ea4976029b018be912ce253cacb9b9f574d 100644 (file)
@@ -50,7 +50,7 @@ fn add_interface(_store: int, managed_ip: String, data: json::Json) -> (String,
             (label, bool_value(false))
         }
         _ => {
-            println!("Expected dict for {} interfaces but found {:?}", managed_ip, data);
+            println!("Expected dict for {} interfaces, found {:?}", managed_ip, data);
             ("gnos:missing-interface".to_string(), bool_value(true))
         }
     }
@@ -68,7 +68,7 @@ fn add_interfaces(store: int, managed_ip: String, device: HashMap<String, json::
         }
         _ =>
         {
-            println!("Expected list for {} interfaces but found {:?}", managed_ip,
+            println!("Expected list for {} interfaces, found {:?}", managed_ip,
                    device.get(&"interfaces".to_string()));
             Vec::new()
         }