-
Notifications
You must be signed in to change notification settings - Fork 13.4k
improve error message on attempt to impl on typedef #9767
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This can be closed, the following works today:
|
@Ryman I think that's impl on a tuple struct, not an impl on a typedef?
doesn't work now, and it would be nice if it did IMHO. The workaround is define a trait ABC and then impl ABC for MyVec... |
@agrover Well it's an impl on a typedef of a newtype(no?), but you're right that my comment is missing half the point that the issue. 😵 |
Today, this gives a much better error
and given that this matches |
…13834) changelog: [`result_unit_err`]: do not suggest using `Error` in `no_std` mode before Rust 1.81 Fix rust-lang#9767
Support for impl on typedefs was removed (IIUC) in PR #6087.
However, the current error you get for attempting to do such a thing is . . . suboptimal:
Or better still, maybe we could actually put in correct support for impl on typedef, which I think was part of what pcwalton was proposing in his mailing list post here: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003866.html
The text was updated successfully, but these errors were encountered: