-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix inconsistent Clone documentation. #57125
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
I'm not sure this is the best way to resolve the inconsistency. I cannot find out another example that the type is However, simply removing the example leaves the section
|
0bacada
to
0fa0587
Compare
I found an example from #26925 , which has been added in this the PR to replace the original example. |
0fa0587
to
a716dfc
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
a716dfc
to
2a79aee
Compare
2a79aee
to
8acb353
Compare
/// library only implements `Clone` up until arrays of size 32. In this case, the implementation of | ||
/// `Clone` cannot be `derive`d, but can be implemented as: | ||
/// An example is a generic struct holding a function pointer. In this case, the | ||
/// implementation of `Clone` cannot be `derive`d, but can be implemented as: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compound words from quoted and non-quoted parts, like derive
d, look weird. (I realize it's part of the text that is not being changed here, and there is another instance just before the added example above.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there doesn't seem to be a reason to markup derive like that IMO
Use function pointer as the example to demonstrate how to implement Clone for Copy types. refs rust-lang#57123
8acb353
to
bbc8c93
Compare
@bors r+ rollup Thanks! |
📌 Commit bbc8c93 has been approved by |
Fix inconsistent Clone documentation. Now, arrays of any size Clone if the element type is Clone. So remove the the document that uses this as an example. refs #57123
💔 Test failed - status-travis |
@bors retry |
Fix inconsistent Clone documentation. Now, arrays of any size Clone if the element type is Clone. So remove the the document that uses this as an example. refs #57123
☀️ Test successful - status-appveyor, status-travis |
Now, arrays of any size Clone if the element type is Clone. So remove the
the document that uses this as an example.
refs #57123