From 54068eea42ae51a05b500e68a3cc283486cb00d4 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 7 Nov 2014 19:19:36 -0500 Subject: [PATCH] Update Partial/Total Eq/Ord terminology --- src/libsyntax/ext/deriving/cmp/eq.rs | 4 ++-- src/libsyntax/ext/deriving/cmp/ord.rs | 8 ++++---- src/libsyntax/ext/deriving/cmp/totalord.rs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libsyntax/ext/deriving/cmp/eq.rs b/src/libsyntax/ext/deriving/cmp/eq.rs index c3b1a52925d..7727bb824db 100644 --- a/src/libsyntax/ext/deriving/cmp/eq.rs +++ b/src/libsyntax/ext/deriving/cmp/eq.rs @@ -30,7 +30,7 @@ pub fn expand_deriving_eq(cx: &mut ExtCtxt, |cx, span, subexpr, self_f, other_fs| { let other_f = match other_fs { [ref o_f] => o_f, - _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Eq)`") + _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialEq)`") }; let eq = cx.expr_binary(span, ast::BiEq, self_f, other_f.clone()); @@ -47,7 +47,7 @@ pub fn expand_deriving_eq(cx: &mut ExtCtxt, |cx, span, subexpr, self_f, other_fs| { let other_f = match other_fs { [ref o_f] => o_f, - _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Eq)`") + _ => cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialEq)`") }; let eq = cx.expr_binary(span, ast::BiNe, self_f, other_f.clone()); diff --git a/src/libsyntax/ext/deriving/cmp/ord.rs b/src/libsyntax/ext/deriving/cmp/ord.rs index 8f3b1edb59f..cd44dde7004 100644 --- a/src/libsyntax/ext/deriving/cmp/ord.rs +++ b/src/libsyntax/ext/deriving/cmp/ord.rs @@ -146,7 +146,7 @@ pub fn cs_partial_cmp(cx: &mut ExtCtxt, span: Span, let new = { let other_f = match other_fs { [ref 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(PartialOrd)`"), }; let args = vec![ @@ -170,7 +170,7 @@ pub fn cs_partial_cmp(cx: &mut ExtCtxt, span: Span, equals_expr.clone(), |cx, span, (self_args, tag_tuple), _non_self_args| { if self_args.len() != 2 { - cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`") + cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialOrd)`") } else { some_ordering_collapsed(cx, span, PartialCmpOp, tag_tuple) } @@ -204,7 +204,7 @@ fn cs_op(less: bool, equal: bool, cx: &mut ExtCtxt, */ let other_f = match other_fs { [ref 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(PartialOrd)`") }; let cmp = cx.expr_binary(span, op, self_f.clone(), other_f.clone()); @@ -218,7 +218,7 @@ fn cs_op(less: bool, equal: bool, cx: &mut ExtCtxt, cx.expr_bool(span, equal), |cx, span, (self_args, tag_tuple), _non_self_args| { if self_args.len() != 2 { - cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`") + cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialOrd)`") } else { let op = match (less, equal) { (true, true) => LeOp, (true, false) => LtOp, diff --git a/src/libsyntax/ext/deriving/cmp/totalord.rs b/src/libsyntax/ext/deriving/cmp/totalord.rs index 9ef463f9c63..d84ad677e5d 100644 --- a/src/libsyntax/ext/deriving/cmp/totalord.rs +++ b/src/libsyntax/ext/deriving/cmp/totalord.rs @@ -108,7 +108,7 @@ pub fn cs_cmp(cx: &mut ExtCtxt, span: Span, cx.expr_path(equals_path.clone()), |cx, span, (self_args, tag_tuple), _non_self_args| { if self_args.len() != 2 { - cx.span_bug(span, "not exactly 2 arguments in `deriving(TotalOrd)`") + cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`") } else { ordering_collapsed(cx, span, tag_tuple) }