diff options
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/abi.rs | 4 | ||||
| -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 | ||||
| -rw-r--r-- | src/libsyntax/opt_vec.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 2 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 8 | ||||
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 2 |
17 files changed, 38 insertions, 38 deletions
diff --git a/src/libsyntax/abi.rs b/src/libsyntax/abi.rs index 9194acfcdec..6b0f2c6e516 100644 --- a/src/libsyntax/abi.rs +++ b/src/libsyntax/abi.rs @@ -323,7 +323,7 @@ fn cannot_combine(n: Abi, m: Abi) { (m == a && n == b)); } None => { - fail!("Invalid match not detected"); + fail!("invalid match not detected"); } } } @@ -335,7 +335,7 @@ fn can_combine(n: Abi, m: Abi) { set.add(m); match set.check_valid() { Some((_, _)) => { - fail!("Valid match declared invalid"); + fail!("valid match declared invalid"); } None => {} } 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)) } diff --git a/src/libsyntax/opt_vec.rs b/src/libsyntax/opt_vec.rs index c575e170bef..21f05fa684a 100644 --- a/src/libsyntax/opt_vec.rs +++ b/src/libsyntax/opt_vec.rs @@ -85,7 +85,7 @@ impl<T> OptVec<T> { pub fn get<'a>(&'a self, i: uint) -> &'a T { match *self { - Empty => fail!("Invalid index {}", i), + Empty => fail!("invalid index {}", i), Vec(ref v) => &v[i] } } @@ -103,7 +103,7 @@ impl<T> OptVec<T> { pub fn swap_remove(&mut self, index: uint) { match *self { - Empty => { fail!("Index out of bounds"); } + Empty => { fail!("index out of bounds"); } Vec(ref mut v) => { assert!(index < v.len()); v.swap_remove(index); diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index b85d89cf804..091fbf82b0d 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -76,7 +76,7 @@ impl ParserObsoleteMethods for Parser { let (kind_str, desc) = match kind { ObsoleteSwap => ( "swap", - "Use std::util::{swap, replace} instead" + "use std::util::{swap, replace} instead" ), ObsoleteUnsafeBlock => ( "non-standalone unsafe block", diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 93574f4d858..fd8b945a177 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -431,7 +431,7 @@ impl Parser { && self.look_ahead(1, |t| *t == token::RBRACE) { // matched; signal non-fatal error and recover. self.span_err(self.span, - "Unit-like struct construction is written with no trailing `{ }`"); + "unit-like struct construction is written with no trailing `{ }`"); self.eat(&token::LBRACE); self.eat(&token::RBRACE); true @@ -1601,7 +1601,7 @@ impl Parser { }; } _ => { - self.fatal(format!("Expected a lifetime name")); + self.fatal(format!("expected a lifetime name")); } } } @@ -2137,7 +2137,7 @@ impl Parser { } // There shouldn't really be a span, but it's easier for the test runner // if we give it one - self.fatal("This file contains an un-closed delimiter "); + self.fatal("this file contains an un-closed delimiter "); } token::LPAREN | token::LBRACE | token::LBRACKET => { let close_delim = token::flip_delimiter(&self.token); @@ -3957,7 +3957,7 @@ impl Parser { } if fields.len() == 0 { let string = get_ident_interner().get(class_name.name); - self.fatal(format!("Unit-like struct definition should be written as `struct {};`", + self.fatal(format!("unit-like struct definition should be written as `struct {};`", string.as_slice())); } self.bump(); diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index 6803bb1eaf9..f6040612961 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -68,7 +68,7 @@ impl<T> SmallVector<T> { match *self { One(ref v) if idx == 0 => v, Many(ref vs) => &vs[idx], - _ => fail!("Out of bounds access") + _ => fail!("out of bounds access") } } |
