1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
//xfail-test // Currently failing with an ICE in trans. (FIXME: #2794) trait Cat { fn meow() -> bool; fn scratch() -> bool { self.purr() } fn purr() -> bool { true } } impl int : Cat { fn meow() -> bool { self.scratch() } } fn main() { assert 5.meow(); }