Closed
Description
For instance impl fmt::Display for [PathSegType] {
leads to:
error: the impl does not reference any types defined in this crate; only traits defined in the current crate can be implemented for arbitrary types [E0117]
Here the error message could be more helpful. The impl actually does reference a type local to the crate, but only as part of non-local type.
The error message gets way more confusing if you use Types with parameters, for instance impl<T: Display + Copy> fmt::Display for [PathSeg<T>] {
leads to:
error: type parameter
T
must be used as the type parameter for some local type (e.g.MyStruct<T>
); only traits defined in the current crate can be implemented for a type parameter [E0210]