You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error message for a trait with an unused parameter recommends the use of PhantomFn even though it's deprecated. It should presumably recommend PhantomData instead, and the documentation on PhantomData should be updated to include an example of how to use it with a trait.
<anon>:1:11: 1:12 error: parameter `T` is never used
<anon>:1 trait Foo<T> {
^
<anon>:1:12: 1:12 help: consider removing `T` or using a marker such as `core::marker::PhantomFn`
error: aborting due to previous error
You also get the same error today (suggesting PhantomFn) when using a "marker-like" trait with no functions, which is filed as #22598 (it needs a better error message).