diff options
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/totaleq.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/cmp/totalord.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/ext/deriving/mod.rs | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/libsyntax/ext/deriving/cmp/totaleq.rs b/src/libsyntax/ext/deriving/cmp/totaleq.rs index b76caccffec..a8124493acb 100644 --- a/src/libsyntax/ext/deriving/cmp/totaleq.rs +++ b/src/libsyntax/ext/deriving/cmp/totaleq.rs @@ -28,7 +28,7 @@ pub fn expand_deriving_totaleq(cx: &mut ExtCtxt, let block = cx.block(span, stmts, None); cx.expr_block(block) }, - |cx, sp, _, _| cx.span_bug(sp, "non matching enums in deriving(TotalEq)?"), + |cx, sp, _, _| cx.span_bug(sp, "non matching enums in deriving(Eq)?"), cx, span, substr) @@ -42,7 +42,7 @@ pub fn expand_deriving_totaleq(cx: &mut ExtCtxt, let trait_def = TraitDef { span: span, attributes: Vec::new(), - path: Path::new(vec!("std", "cmp", "TotalEq")), + path: Path::new(vec!("std", "cmp", "Eq")), additional_bounds: Vec::new(), generics: LifetimeBounds::empty(), methods: vec!( diff --git a/src/libsyntax/ext/deriving/cmp/totalord.rs b/src/libsyntax/ext/deriving/cmp/totalord.rs index 3ca4f9e2862..c4611a552f5 100644 --- a/src/libsyntax/ext/deriving/cmp/totalord.rs +++ b/src/libsyntax/ext/deriving/cmp/totalord.rs @@ -28,7 +28,7 @@ pub fn expand_deriving_totalord(cx: &mut ExtCtxt, let trait_def = TraitDef { span: span, attributes: Vec::new(), - path: Path::new(vec!("std", "cmp", "TotalOrd")), + path: Path::new(vec!("std", "cmp", "Ord")), additional_bounds: Vec::new(), generics: LifetimeBounds::empty(), methods: vec!( @@ -117,7 +117,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(Ord)`") } }, cx, span, substr) diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs index 3735248e9e2..1d8081e2ae3 100644 --- a/src/libsyntax/ext/deriving/mod.rs +++ b/src/libsyntax/ext/deriving/mod.rs @@ -77,10 +77,11 @@ pub fn expand_meta_deriving(cx: &mut ExtCtxt, "Encodable" => expand!(encodable::expand_deriving_encodable), "Decodable" => expand!(decodable::expand_deriving_decodable), + // NOTE: after a stage0 snap this needs treatment "PartialEq" => expand!(eq::expand_deriving_eq), - "TotalEq" => expand!(totaleq::expand_deriving_totaleq), + "Eq" | "TotalEq" => expand!(totaleq::expand_deriving_totaleq), "PartialOrd" => expand!(ord::expand_deriving_ord), - "TotalOrd" => expand!(totalord::expand_deriving_totalord), + "Ord" | "TotalOrd" => expand!(totalord::expand_deriving_totalord), "Rand" => expand!(rand::expand_deriving_rand), |
