Closed
Description
Code:
// #[deriving(Eq, Ord, PartialEq, PartialOrd)]
struct X { x: int }
pub fn main() {
let mut b: Vec<X> = Vec::new();
b.sort();
}
Error:
tmp.rs:6:7: 6:13 error: type `collections::vec::Vec<X>` does not implement any method in scope named `sort`
tmp.rs:6 b.sort();
The compiler should tell us, struct X
doesn't implements Ord
, at least.