I find this message better than the current. It won't mislead me.

Le 05/12/2013 22:50, Corey Richardson a écrit :
How about "method `foo` no found and no trait in scope provided one" ?

On Thu, Dec 5, 2013 at 4:29 PM, Philippe Delrieu
<philippe.delr...@free.fr> wrote:
Perhaps the error message can be more explicit like trait not found for
method instead of method not found.


Le 05/12/2013 21:57, Corey Richardson a écrit :

No, since it isn't known which trait the method should come from. It
could list *all* the traits that provide that method with that
signature, but even that wouldn't be great if you had the signature
off.

On Thu, Dec 5, 2013 at 3:26 PM, Philippe Delrieu
<philippe.delr...@free.fr> wrote:
I found my error. It's a classical problem.
TestStruct2 implement the trait `extra::serialize::Encodable` using the
generated impl by the compiler.
I didn't declare : use extra::serialize::Encodable;
So the compiler doesn't find it and declare the problem at the
implementation.
It's the same problem when you work with different file and the trait is
implemented in one file and use in another.
Usually I found the error but I was confused with other errors and the
message wasn't clear.
Is it possible to change the message by for example in this case trait
`extra::serialize::Encodable` not found for encode,
or to add all `use` needed when using a type and its implementation.

Philippe



_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to