Update Partial/Total Eq/Ord terminology

This commit is contained in:
Jorge Aparicio 2014-11-07 19:19:36 -05:00
parent 3c442b92ae
commit 54068eea42
3 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

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