Rust suggests implementing private trait #25358
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
With the following code:
(playpen: http://is.gd/H05mfZ)
Rust tries to help with:
This trait is impossible to implement however, as it is private - when implemented, rust will give a separate error about the trait being private. If this is the case, rust shouldn't suggest it at all.
Here's a playpen actually implementing the trait in question: http://is.gd/UQakvD
While this really isn't that much of a problem, as it is pretty obvious (to me) that I don't want to implement a NewThread trait, suggestions like this from the compiler may be confusing and discourage new users of the language.
The text was updated successfully, but these errors were encountered: