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
This commit is contained in:
mr.Shu 2014-02-06 10:38:08 +01:00
parent 35518514c4
commit ee3fa68fed
74 changed files with 167 additions and 167 deletions

View file

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

View file

@ -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)

View file

@ -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)

View file

@ -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`")
}
}
}

View file

@ -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() {

View file

@ -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 {

View file

@ -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`") }
}
}
}