]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/deriving-cmp-shortcircuit.rs
cleanup: s/impl Copy/#[derive(Copy)]/g
[rust.git] / src / test / run-pass / deriving-cmp-shortcircuit.rs
index b68d8058381d2322c67c3e97ee6787db203b4972..bc55b9132c836314b665fa11edf39971241c1ac6 100644 (file)
@@ -12,6 +12,8 @@
 // where possible, by having a type that panics when compared as the
 // second element, so this passes iff the instances shortcircuit.
 
+use std::cmp::Ordering;
+
 pub struct FailCmp;
 impl PartialEq for FailCmp {
     fn eq(&self, _: &FailCmp) -> bool { panic!("eq") }
@@ -27,7 +29,7 @@ impl Ord for FailCmp {
     fn cmp(&self, _: &FailCmp) -> Ordering { panic!("cmp") }
 }
 
-#[deriving(PartialEq,PartialOrd,Eq,Ord)]
+#[derive(PartialEq,PartialOrd,Eq,Ord)]
 struct ShortCircuit {
     x: int,
     y: FailCmp