Closed
Description
With the following code:
struct Foo;
fn main() {
Foo::new();
}
(playpen: http://is.gd/H05mfZ)
Rust tries to help with:
<anon>:4:5: 4:13 help: methods from traits can only be called if the trait is implemented and in scope; the following trait defines a method `new`, perhaps you need to implement it:
<anon>:4:5: 4:13 help: candidate #1: `std::sys_common::thread_info::NewThread`
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.