about summary refs log tree commit diff
path: root/src/libsyntax/ext/deriving/cmp/totalord.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax/ext/deriving/cmp/totalord.rs')
-rw-r--r--src/libsyntax/ext/deriving/cmp/totalord.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libsyntax/ext/deriving/cmp/totalord.rs b/src/libsyntax/ext/deriving/cmp/totalord.rs
index 7d560a197d0..5ec4e028454 100644
--- a/src/libsyntax/ext/deriving/cmp/totalord.rs
+++ b/src/libsyntax/ext/deriving/cmp/totalord.rs
@@ -55,15 +55,16 @@ pub fn ordering_const(cx: @ext_ctxt, span: span, cnst: Ordering) -> @expr {
 
 pub fn cs_cmp(cx: @ext_ctxt, span: span,
               substr: &Substructure) -> @expr {
-    let lexical_ord = ~[cx.ident_of("core"),
-                        cx.ident_of("cmp"),
-                        cx.ident_of("lexical_ordering")];
 
     cs_same_method_fold(
         // foldr (possibly) nests the matches in lexical_ordering better
         false,
         |cx, span, old, new| {
-            build::mk_call_global(cx, span, lexical_ord, ~[old, new])
+            build::mk_call_global(cx, span,
+                                  ~[cx.ident_of("core"),
+                                    cx.ident_of("cmp"),
+                                    cx.ident_of("lexical_ordering")],
+                                  ~[old, new])
         },
         ordering_const(cx, span, Equal),
         |cx, span, list, _| {