diff options
| author | mr.Shu <mr@shu.io> | 2014-02-06 10:38:08 +0100 |
|---|---|---|
| committer | mr.Shu <mr@shu.io> | 2014-02-08 20:59:38 +0100 |
| commit | ee3fa68fed13e7b8cde523e4bc73b9a07d082212 (patch) | |
| tree | 225c4c1b7d0c304d9f2f6e44c32c4d7345a26b26 /src/libsyntax/ext | |
| parent | 35518514c472e0b7bb4dd3588c4c80bd6dd5a627 (diff) | |
| download | rust-ee3fa68fed13e7b8cde523e4bc73b9a07d082212.tar.gz rust-ee3fa68fed13e7b8cde523e4bc73b9a07d082212.zip | |
Fixed error starting with uppercase
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/bytes.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/clone.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/ord.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/totalord.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/generic.rs | 12 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/iter_bytes.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/primitive.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/ty.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/quote.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/registrar.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/tt/transcribe.rs | 2 |
12 files changed, 28 insertions, 28 deletions
diff --git a/src/libsyntax/ext/bytes.rs b/src/libsyntax/ext/bytes.rs index 6852a0cec33..39bb870b969 100644 --- a/src/libsyntax/ext/bytes.rs +++ b/src/libsyntax/ext/bytes.rs @@ -40,7 +40,7 @@ pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> // u8 literal, push to vector expression ast::LitUint(v, ast::TyU8) => { if v > 0xFF { - cx.span_err(expr.span, "Too large u8 literal in bytes!") + cx.span_err(expr.span, "too large u8 literal in bytes!") } else { bytes.push(cx.expr_u8(expr.span, v as u8)); } @@ -49,9 +49,9 @@ pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> // integer literal, push to vector expression ast::LitIntUnsuffixed(v) => { if v > 0xFF { - cx.span_err(expr.span, "Too large integer literal in bytes!") + cx.span_err(expr.span, "too large integer literal in bytes!") } else if v < 0 { - cx.span_err(expr.span, "Negative integer literal in bytes!") + cx.span_err(expr.span, "negative integer literal in bytes!") } else { bytes.push(cx.expr_u8(expr.span, v as u8)); } @@ -62,14 +62,14 @@ pub fn expand_syntax_ext(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) -> if char::from_u32(v).unwrap().is_ascii() { bytes.push(cx.expr_u8(expr.span, v as u8)); } else { - cx.span_err(expr.span, "Non-ascii char literal in bytes!") + cx.span_err(expr.span, "non-ascii char literal in bytes!") } } - _ => cx.span_err(expr.span, "Unsupported literal in bytes!") + _ => cx.span_err(expr.span, "unsupported literal in bytes!") }, - _ => cx.span_err(expr.span, "Non-literal in bytes!") + _ => cx.span_err(expr.span, "non-literal in bytes!") } } diff --git a/src/libsyntax/ext/deriving/clone.rs b/src/libsyntax/ext/deriving/clone.rs index 17361240628..d911208e7de 100644 --- a/src/libsyntax/ext/deriving/clone.rs +++ b/src/libsyntax/ext/deriving/clone.rs @@ -92,10 +92,10 @@ fn cs_clone( all_fields = af; }, EnumNonMatching(..) => cx.span_bug(trait_span, - format!("Non-matching enum variants in `deriving({})`", + format!("non-matching enum variants in `deriving({})`", name)), StaticEnum(..) | StaticStruct(..) => cx.span_bug(trait_span, - format!("Static method in `deriving({})`", + format!("static method in `deriving({})`", name)) } diff --git a/src/libsyntax/ext/deriving/cmp/ord.rs b/src/libsyntax/ext/deriving/cmp/ord.rs index 83f623e3066..c06b4e30e07 100644 --- a/src/libsyntax/ext/deriving/cmp/ord.rs +++ b/src/libsyntax/ext/deriving/cmp/ord.rs @@ -75,7 +75,7 @@ fn cs_op(less: bool, equal: bool, cx: &mut ExtCtxt, span: Span, substr: &Substru */ let other_f = match other_fs { [o_f] => o_f, - _ => cx.span_bug(span, "Not exactly 2 arguments in `deriving(Ord)`") + _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`") }; let cmp = cx.expr_binary(span, op, self_f, other_f); @@ -99,7 +99,7 @@ fn cs_op(less: bool, equal: bool, cx: &mut ExtCtxt, span: Span, substr: &Substru } else { self_var > other_var }), - _ => cx.span_bug(span, "Not exactly 2 arguments in `deriving(Ord)`") + _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`") } }, cx, span, substr) diff --git a/src/libsyntax/ext/deriving/cmp/totalord.rs b/src/libsyntax/ext/deriving/cmp/totalord.rs index 27a766c0e75..68de158e9e7 100644 --- a/src/libsyntax/ext/deriving/cmp/totalord.rs +++ b/src/libsyntax/ext/deriving/cmp/totalord.rs @@ -110,7 +110,7 @@ pub fn cs_cmp(cx: &mut ExtCtxt, span: Span, let order = ordering_const(cx, span, self_var.cmp(&other_var)); cx.expr_path(order) } - _ => cx.span_bug(span, "Not exactly 2 arguments in `deriving(TotalOrd)`") + _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(TotalOrd)`") } }, cx, span, substr) diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs index 8c06f0b8c8a..01006a0c15d 100644 --- a/src/libsyntax/ext/deriving/generic.rs +++ b/src/libsyntax/ext/deriving/generic.rs @@ -656,7 +656,7 @@ impl<'a> MethodDef<'a> { }).collect() } [] => { trait_.cx.span_bug(trait_.span, - "No self arguments to non-static method \ + "no self arguments to non-static method \ in generic `deriving`") } }; @@ -840,7 +840,7 @@ impl<'a> MethodDef<'a> { let index = match matching { Some(i) => i, None => cx.span_bug(trait_.span, - "Non-matching variants when required to \ + "non-matching variants when required to \ be matching in generic `deriving`") }; @@ -965,7 +965,7 @@ impl<'a> TraitDef<'a> { match (just_spans.is_empty(), named_idents.is_empty()) { (false, false) => self.cx.span_bug(self.span, - "A struct with named and unnamed \ + "a struct with named and unnamed \ fields in generic `deriving`"), // named fields (_, false) => Named(named_idents), @@ -1019,7 +1019,7 @@ impl<'a> TraitDef<'a> { None } _ => { - cx.span_bug(sp, "A struct with named and unnamed fields in `deriving`"); + cx.span_bug(sp, "a struct with named and unnamed fields in `deriving`"); } }; let path = cx.path_ident(sp, cx.ident_of(format!("{}_{}", prefix, i))); @@ -1116,7 +1116,7 @@ pub fn cs_fold(use_foldl: bool, *all_enums, substructure.nonself_args), StaticEnum(..) | StaticStruct(..) => { - cx.span_bug(trait_span, "Static function in `deriving`") + cx.span_bug(trait_span, "static function in `deriving`") } } } @@ -1154,7 +1154,7 @@ pub fn cs_same_method(f: |&mut ExtCtxt, Span, ~[@Expr]| -> @Expr, *all_enums, substructure.nonself_args), StaticEnum(..) | StaticStruct(..) => { - cx.span_bug(trait_span, "Static function in `deriving`") + cx.span_bug(trait_span, "static function in `deriving`") } } } diff --git a/src/libsyntax/ext/deriving/iter_bytes.rs b/src/libsyntax/ext/deriving/iter_bytes.rs index 53805694725..5f680745ea7 100644 --- a/src/libsyntax/ext/deriving/iter_bytes.rs +++ b/src/libsyntax/ext/deriving/iter_bytes.rs @@ -48,7 +48,7 @@ pub fn expand_deriving_iter_bytes(cx: &mut ExtCtxt, fn iter_bytes_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> @Expr { let (lsb0, f)= match substr.nonself_args { [l, f] => (l, f), - _ => cx.span_bug(trait_span, "Incorrect number of arguments in `deriving(IterBytes)`") + _ => cx.span_bug(trait_span, "incorrect number of arguments in `deriving(IterBytes)`") }; // Build the "explicitly borrowed" stack closure, "|_buf| f(_buf)". let blk_arg = cx.ident_of("_buf"); @@ -82,7 +82,7 @@ fn iter_bytes_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substruc fields = fs; } - _ => cx.span_bug(trait_span, "Impossible substructure in `deriving(IterBytes)`") + _ => cx.span_bug(trait_span, "impossible substructure in `deriving(IterBytes)`") } for &FieldInfo { self_, span, .. } in fields.iter() { diff --git a/src/libsyntax/ext/deriving/primitive.rs b/src/libsyntax/ext/deriving/primitive.rs index 86c46705d81..f74b807bae6 100644 --- a/src/libsyntax/ext/deriving/primitive.rs +++ b/src/libsyntax/ext/deriving/primitive.rs @@ -68,7 +68,7 @@ pub fn expand_deriving_from_primitive(cx: &mut ExtCtxt, fn cs_from(name: &str, cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> @Expr { let n = match substr.nonself_args { [n] => n, - _ => cx.span_bug(trait_span, "Incorrect number of arguments in `deriving(FromPrimitive)`") + _ => cx.span_bug(trait_span, "incorrect number of arguments in `deriving(FromPrimitive)`") }; match *substr.fields { diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs index f37abbe1ef4..ff0fd388ebe 100644 --- a/src/libsyntax/ext/deriving/ty.rs +++ b/src/libsyntax/ext/deriving/ty.rs @@ -178,8 +178,8 @@ impl<'a> Ty<'a> { Literal(ref p) => { p.to_path(cx, span, self_ty, self_generics) } - Ptr(..) => { cx.span_bug(span, "Pointer in a path in generic `deriving`") } - Tuple(..) => { cx.span_bug(span, "Tuple in a path in generic `deriving`") } + Ptr(..) => { cx.span_bug(span, "pointer in a path in generic `deriving`") } + Tuple(..) => { cx.span_bug(span, "tuple in a path in generic `deriving`") } } } } diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index bd1ac616f52..e9832209904 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -257,7 +257,7 @@ pub mod rt { match res { Some(ast) => ast, None => { - error!("Parse error"); + error!("parse error"); fail!() } } @@ -589,7 +589,7 @@ fn expand_tts(cx: &ExtCtxt, sp: Span, tts: &[ast::TokenTree]) let cx_expr = p.parse_expr(); if !p.eat(&token::COMMA) { - p.fatal("Expected token `,`"); + p.fatal("expected token `,`"); } let tts = p.parse_all_token_trees(); diff --git a/src/libsyntax/ext/registrar.rs b/src/libsyntax/ext/registrar.rs index 1c349c4343a..e831e8fbb10 100644 --- a/src/libsyntax/ext/registrar.rs +++ b/src/libsyntax/ext/registrar.rs @@ -49,7 +49,7 @@ pub fn find_macro_registrar(diagnostic: @diagnostic::SpanHandler, }) }, _ => { - diagnostic.handler().err("Multiple macro registration functions found"); + diagnostic.handler().err("multiple macro registration functions found"); for &(_, span) in ctx.registrars.iter() { diagnostic.span_note(span, "one is here"); } diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index a18f80ad4c9..92bc204e2c1 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -185,7 +185,7 @@ pub fn nameize(p_s: @ParseSess, ms: &[Matcher], res: &[@NamedMatch]) if ret_val.contains_key(bind_name) { let string = token::get_ident(bind_name.name); p_s.span_diagnostic - .span_fatal(sp, "Duplicated bind name: " + string.get()) + .span_fatal(sp, "duplicated bind name: " + string.get()) } ret_val.insert(*bind_name, res[idx]); } @@ -441,6 +441,6 @@ pub fn parse_nt(p: &mut Parser, name: &str) -> Nonterminal { res } "matchers" => token::NtMatchers(p.parse_matchers()), - _ => p.fatal(~"Unsupported builtin nonterminal parser: " + name) + _ => p.fatal(~"unsupported builtin nonterminal parser: " + name) } } diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs index 430bd02119a..fccbc57f12c 100644 --- a/src/libsyntax/ext/tt/transcribe.rs +++ b/src/libsyntax/ext/tt/transcribe.rs @@ -148,7 +148,7 @@ fn lis_merge(lhs: LockstepIterSize, rhs: LockstepIterSize) -> LockstepIterSize { LisConstraint(r_len, ref r_id) => { let l_n = token::get_ident(l_id.name); let r_n = token::get_ident(r_id.name); - LisContradiction(format!("Inconsistent lockstep iteration: \ + LisContradiction(format!("inconsistent lockstep iteration: \ '{}' has {} items, but '{}' has {}", l_n.get(), l_len, r_n.get(), r_len)) } |
