diff options
Diffstat (limited to 'src/libsyntax/ext/deriving')
| -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 |
7 files changed, 16 insertions, 16 deletions
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`") } } } } |
