rust/src/test/compile-fail/issue-3344.rs
Tim Chevalier c6b51547c1 In typeck, don't assume traits with default methods are in the same crate
But note that default methods still don't work cross-crate (see #2794) --
this just makes it so that when a method is missing in a cross-crate impl,
the right error message gets printed.

Closes #3344
2012-09-07 10:27:29 -07:00

8 lines
262 B
Rust

enum thing = uint;
impl thing : cmp::Ord { //~ ERROR missing method `gt`
pure fn lt(&&other: thing) -> bool { *self < *other }
pure fn le(&&other: thing) -> bool { *self < *other }
pure fn ge(&&other: thing) -> bool { *self < *other }
}
fn main() {}