Skip to content

Commit 54068ee

Browse files
author
Jorge Aparicio
committedNov 8, 2014
Update Partial/Total Eq/Ord terminology
1 parent 3c442b9 commit 54068ee

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
 

Diff for: ‎src/libsyntax/ext/deriving/cmp/eq.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn expand_deriving_eq(cx: &mut ExtCtxt,
3030
|cx, span, subexpr, self_f, other_fs| {
3131
let other_f = match other_fs {
3232
[ref o_f] => o_f,
33-
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Eq)`")
33+
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialEq)`")
3434
};
3535

3636
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,
4747
|cx, span, subexpr, self_f, other_fs| {
4848
let other_f = match other_fs {
4949
[ref o_f] => o_f,
50-
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Eq)`")
50+
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialEq)`")
5151
};
5252

5353
let eq = cx.expr_binary(span, ast::BiNe, self_f, other_f.clone());

Diff for: ‎src/libsyntax/ext/deriving/cmp/ord.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ pub fn cs_partial_cmp(cx: &mut ExtCtxt, span: Span,
146146
let new = {
147147
let other_f = match other_fs {
148148
[ref o_f] => o_f,
149-
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`"),
149+
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialOrd)`"),
150150
};
151151

152152
let args = vec![
@@ -170,7 +170,7 @@ pub fn cs_partial_cmp(cx: &mut ExtCtxt, span: Span,
170170
equals_expr.clone(),
171171
|cx, span, (self_args, tag_tuple), _non_self_args| {
172172
if self_args.len() != 2 {
173-
cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`")
173+
cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialOrd)`")
174174
} else {
175175
some_ordering_collapsed(cx, span, PartialCmpOp, tag_tuple)
176176
}
@@ -204,7 +204,7 @@ fn cs_op(less: bool, equal: bool, cx: &mut ExtCtxt,
204204
*/
205205
let other_f = match other_fs {
206206
[ref o_f] => o_f,
207-
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`")
207+
_ => cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialOrd)`")
208208
};
209209

210210
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,
218218
cx.expr_bool(span, equal),
219219
|cx, span, (self_args, tag_tuple), _non_self_args| {
220220
if self_args.len() != 2 {
221-
cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`")
221+
cx.span_bug(span, "not exactly 2 arguments in `deriving(PartialOrd)`")
222222
} else {
223223
let op = match (less, equal) {
224224
(true, true) => LeOp, (true, false) => LtOp,

Diff for: ‎src/libsyntax/ext/deriving/cmp/totalord.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub fn cs_cmp(cx: &mut ExtCtxt, span: Span,
108108
cx.expr_path(equals_path.clone()),
109109
|cx, span, (self_args, tag_tuple), _non_self_args| {
110110
if self_args.len() != 2 {
111-
cx.span_bug(span, "not exactly 2 arguments in `deriving(TotalOrd)`")
111+
cx.span_bug(span, "not exactly 2 arguments in `deriving(Ord)`")
112112
} else {
113113
ordering_collapsed(cx, span, tag_tuple)
114114
}

0 commit comments

Comments
 (0)