This is fixed by adding use some_mod::SomeTrait at the start of
some_use.rs. It's as though traits need to be in the same scope as
code that expects to make use of their behaviour (where I'd expect the
behaviour would be associated with the implementation for the self
type).
My question is:
Hey folks,
A work colleague is trying to pick up some Rust we were both
surprised by the following:
// some_mod.rs
pub trait SomeTrait {
pub fn foo(self) - ~str;
}
pub struct SomeStruct {
name: ~str
}
impl SomeTrait for SomeStruct {
pub fn foo(self) - ~str {