Clean up error message punctuation/capitalization

This commit is contained in:
Lindsey Kuper 2012-07-05 15:01:12 -07:00
parent a0dbf58245
commit 47f61c5429
3 changed files with 33 additions and 33 deletions

View File

@ -97,7 +97,7 @@ fn ast_path_to_substs_and_ty<AC: ast_conv, RS: region_scope copy>(
(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<AC: ast_conv, RS: region_scope copy>(
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<AC: ast_conv, RS: region_scope copy>(
_ {
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<AC: ast_conv, RS: region_scope copy>(
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<AC: ast_conv, RS: region_scope copy>(
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<AC: ast_conv, RS: region_scope copy>(
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 */ }
}

View File

@ -1,29 +1,29 @@
fn main() {
let x: int<int>; //~ ERROR Type parameters are not allowed on this type.
let x: i8<int>; //~ ERROR Type parameters are not allowed on this type.
let x: i16<int>; //~ ERROR Type parameters are not allowed on this type.
let x: i32<int>; //~ ERROR Type parameters are not allowed on this type.
let x: i64<int>; //~ ERROR Type parameters are not allowed on this type.
let x: uint<int>; //~ ERROR Type parameters are not allowed on this type.
let x: u8<int>; //~ ERROR Type parameters are not allowed on this type.
let x: u16<int>; //~ ERROR Type parameters are not allowed on this type.
let x: u32<int>; //~ ERROR Type parameters are not allowed on this type.
let x: u64<int>; //~ ERROR Type parameters are not allowed on this type.
let x: float<int>; //~ ERROR Type parameters are not allowed on this type.
let x: char<int>; //~ ERROR Type parameters are not allowed on this type.
let x: int<int>; //~ ERROR type parameters are not allowed on this type
let x: i8<int>; //~ ERROR type parameters are not allowed on this type
let x: i16<int>; //~ ERROR type parameters are not allowed on this type
let x: i32<int>; //~ ERROR type parameters are not allowed on this type
let x: i64<int>; //~ ERROR type parameters are not allowed on this type
let x: uint<int>; //~ ERROR type parameters are not allowed on this type
let x: u8<int>; //~ ERROR type parameters are not allowed on this type
let x: u16<int>; //~ ERROR type parameters are not allowed on this type
let x: u32<int>; //~ ERROR type parameters are not allowed on this type
let x: u64<int>; //~ ERROR type parameters are not allowed on this type
let x: float<int>; //~ ERROR type parameters are not allowed on this type
let x: char<int>; //~ 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
}

View File

@ -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;
}