Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused trait parameter error recommends unstable feature #25852

Closed
jethrogb opened this Issue May 28, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@jethrogb
Copy link
Contributor

jethrogb commented May 28, 2015

Compiling this with 1.0.0:

trait Foo {}
struct Bar<T: Foo>;

gives:

<anon>:2:12: 2:13 error: parameter `T` is never used
<anon>:2 struct Bar<T: Foo>;
                    ^
<anon>:2:12: 2:13 help: consider removing `T` or using a marker such as `core::marker::PhantomData`

This should recommend std::marker::PhantomData instead, because using core both sounds scary and is unstable.

@jethrogb

This comment has been minimized.

Copy link
Contributor Author

jethrogb commented Apr 2, 2016

This has been fixed. core is stable now. nightly actually says std now.

@jethrogb jethrogb closed this Apr 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.