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 section on Object Safety defines that concept with a list of bullet points. That list does not include the case when the trait takes Self as a type parameter, but that is included as an example below the list.
// Not object safe if `Self` is a type argument.
I suggest adding a bullet of
A generic parameter of this trait, or any of its supertraits, is not specified to be Self
together with an expanded example to show that this applies even when Self: ?Sized. An example of this in action is PartialEq not being object safe.
If I get the thumbs-up I'll make a PR
The text was updated successfully, but these errors were encountered:
Thanks for the report! Closing as a duplicate of #756.
Unfortunately I don't understand the rule introduced in rust-lang/rust#22452 well enough to articulate it in English. I'll try pinging the lang team again on Zulip.
The section on Object Safety defines that concept with a list of bullet points. That list does not include the case when the trait takes
Self
as a type parameter, but that is included as an example below the list.// Not object safe if `Self` is a type argument.
I suggest adding a bullet of
together with an expanded example to show that this applies even when
Self: ?Sized
. An example of this in action isPartialEq
not being object safe.If I get the thumbs-up I'll make a PR
The text was updated successfully, but these errors were encountered: