diff --git a/src/rustc/middle/typeck/astconv.rs b/src/rustc/middle/typeck/astconv.rs index 2561c66940a..b171f9fc041 100644 --- a/src/rustc/middle/typeck/astconv.rs +++ b/src/rustc/middle/typeck/astconv.rs @@ -97,7 +97,7 @@ fn ast_path_to_substs_and_ty( (ast::rp_none, some(_)) { tcx.sess.span_err( path.span, - #fmt["No region bound is permitted on %s, \ + #fmt["no region bound is permitted on %s, \ which is not declared as containing region pointers", ty::item_path_str(tcx, did)]); none @@ -116,7 +116,7 @@ fn ast_path_to_substs_and_ty( if !vec::same_length(*decl_bounds, path.types) { self.tcx().sess.span_fatal( path.span, - #fmt["wrong number of type arguments, expected %u but found %u", + #fmt["wrong number of type arguments: expected %u but found %u", (*decl_bounds).len(), path.types.len()]); } let tps = path.types.map(|a_t| ast_ty_to_ty(self, rscope, a_t)); @@ -181,7 +181,7 @@ fn ast_ty_to_ty( _ { tcx.sess.span_err( a_seq_ty.span, - #fmt["Bound not allowed on a %s.", + #fmt["bound not allowed on a %s", ty::ty_sort_str(tcx, seq_ty)]); ret seq_ty; } @@ -195,7 +195,7 @@ fn ast_ty_to_ty( if path.types.len() > 0u { tcx.sess.span_err( path.span, - "Type parameters are not allowed on this type."); + "type parameters are not allowed on this type"); } } @@ -203,7 +203,7 @@ fn ast_ty_to_ty( if path.rp.is_some() { tcx.sess.span_err( path.span, - "Region parameters are not allowed on this type."); + "region parameters are not allowed on this type"); } } } @@ -213,9 +213,9 @@ fn ast_ty_to_ty( alt tcx.ast_ty_to_ty_cache.find(ast_ty) { some(ty::atttce_resolved(ty)) { ret ty; } some(ty::atttce_unresolved) { - tcx.sess.span_fatal(ast_ty.span, "illegal recursive type. \ + tcx.sess.span_fatal(ast_ty.span, "illegal recursive type; \ insert an enum in the cycle, \ - if this is desired)"); + if this is desired"); } none { /* go on */ } } diff --git a/src/test/compile-fail/prim-with-args.rs b/src/test/compile-fail/prim-with-args.rs index 6edb9cb59d8..bb97c7b4bef 100644 --- a/src/test/compile-fail/prim-with-args.rs +++ b/src/test/compile-fail/prim-with-args.rs @@ -1,29 +1,29 @@ fn main() { -let x: int; //~ ERROR Type parameters are not allowed on this type. -let x: i8; //~ ERROR Type parameters are not allowed on this type. -let x: i16; //~ ERROR Type parameters are not allowed on this type. -let x: i32; //~ ERROR Type parameters are not allowed on this type. -let x: i64; //~ ERROR Type parameters are not allowed on this type. -let x: uint; //~ ERROR Type parameters are not allowed on this type. -let x: u8; //~ ERROR Type parameters are not allowed on this type. -let x: u16; //~ ERROR Type parameters are not allowed on this type. -let x: u32; //~ ERROR Type parameters are not allowed on this type. -let x: u64; //~ ERROR Type parameters are not allowed on this type. -let x: float; //~ ERROR Type parameters are not allowed on this type. -let x: char; //~ ERROR Type parameters are not allowed on this type. +let x: int; //~ ERROR type parameters are not allowed on this type +let x: i8; //~ ERROR type parameters are not allowed on this type +let x: i16; //~ ERROR type parameters are not allowed on this type +let x: i32; //~ ERROR type parameters are not allowed on this type +let x: i64; //~ ERROR type parameters are not allowed on this type +let x: uint; //~ ERROR type parameters are not allowed on this type +let x: u8; //~ ERROR type parameters are not allowed on this type +let x: u16; //~ ERROR type parameters are not allowed on this type +let x: u32; //~ ERROR type parameters are not allowed on this type +let x: u64; //~ ERROR type parameters are not allowed on this type +let x: float; //~ ERROR type parameters are not allowed on this type +let x: char; //~ ERROR type parameters are not allowed on this type -let x: int/&; //~ ERROR Region parameters are not allowed on this type. -let x: i8/&; //~ ERROR Region parameters are not allowed on this type. -let x: i16/&; //~ ERROR Region parameters are not allowed on this type. -let x: i32/&; //~ ERROR Region parameters are not allowed on this type. -let x: i64/&; //~ ERROR Region parameters are not allowed on this type. -let x: uint/&; //~ ERROR Region parameters are not allowed on this type. -let x: u8/&; //~ ERROR Region parameters are not allowed on this type. -let x: u16/&; //~ ERROR Region parameters are not allowed on this type. -let x: u32/&; //~ ERROR Region parameters are not allowed on this type. -let x: u64/&; //~ ERROR Region parameters are not allowed on this type. -let x: float/&; //~ ERROR Region parameters are not allowed on this type. -let x: char/&; //~ ERROR Region parameters are not allowed on this type. +let x: int/&; //~ ERROR region parameters are not allowed on this type +let x: i8/&; //~ ERROR region parameters are not allowed on this type +let x: i16/&; //~ ERROR region parameters are not allowed on this type +let x: i32/&; //~ ERROR region parameters are not allowed on this type +let x: i64/&; //~ ERROR region parameters are not allowed on this type +let x: uint/&; //~ ERROR region parameters are not allowed on this type +let x: u8/&; //~ ERROR region parameters are not allowed on this type +let x: u16/&; //~ ERROR region parameters are not allowed on this type +let x: u32/&; //~ ERROR region parameters are not allowed on this type +let x: u64/&; //~ ERROR region parameters are not allowed on this type +let x: float/&; //~ ERROR region parameters are not allowed on this type +let x: char/&; //~ ERROR region parameters are not allowed on this type } diff --git a/src/test/compile-fail/regions-bounds.rs b/src/test/compile-fail/regions-bounds.rs index 9eef8c1a643..ae9f16ae714 100644 --- a/src/test/compile-fail/regions-bounds.rs +++ b/src/test/compile-fail/regions-bounds.rs @@ -19,8 +19,8 @@ fn a_fn3(e: a_class/&a) -> a_class/&b { } fn a_fn4(e: int/&a) -> int/&b { - //~^ ERROR Region parameters are not allowed on this type. - //~^^ ERROR Region parameters are not allowed on this type. + //~^ ERROR region parameters are not allowed on this type + //~^^ ERROR region parameters are not allowed on this type ret e; }