Closed
Description
The following code fails to compile:
pub trait Even {
fn say(&self);
}
impl <'a, E: Even> Even for &'a mut E {
fn say(&self) { }
}
pub trait Odd {
fn say(&self);
}
fn print_odd<O: Odd>(o: &mut O) {
o.say();
}
fn main() { }
with the error:
foo9.rs:14:5: 14:12 error: failed to find an implementation of trait Even for O
foo9.rs:14 o.say();
^~~~~~~