Closed
Description
I am trying to implement my own trait called Reader
, but I accidentally had a different Reader
trait in scope.
/home/brian/dev/rust/src/libcore/rt/io/comm_adapters.rs:20:4: 20:67 error: method `read` has 1 parameters
but the trait has 2
/home/brian/dev/rust/src/libcore/rt/io/comm_adapters.rs:20 fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It took some time to figure out that rustc and I were looking at different traits. It could tell me the path to the trait it is trying to match. Even better, it could tell me about alternate traits with the same name.