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

Rollup of 10 pull requests #33900

Merged
merged 41 commits into from
May 27, 2016
Merged

Rollup of 10 pull requests #33900

merged 41 commits into from
May 27, 2016

Conversation

carols10cents and others added 30 commits May 23, 2016 10:03
I think these just got out of sync, but both use a lexicographic
ordering.

Relevant commits in the history of these explanations:
* 8b81f76 on 2015-06-30
* e22770b on 2016-02-09
This matches the other subsections.
The new order puts all the "when" questions together and puts the "how"
question with the "derivable" section. So you have to scroll past (and
hopefully read) the can/cannot/should caveats and guidelines to get to
the information about how to actually go about doing it once you've
determined that you can and should, with derivable information first so
that you can just use the derived implementation if that applies.

Previous order:

* General explanation
* When can my type be `Copy`?
* How can I implement `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable

New order:

* General explanation
* When can my type be `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable
* How can I implement `Copy`?
Including an example of a custom implementation. I put this expanded
section after the `Derivable` section to encourage use of that first.
Building on the example in PartialEq.
A bit of duplication from the module documentation, but simplified
to be closer to being trivially copy-paste-able.
Similar to the `Ord` examples but calling out that it can be defined
using `cmp` from `Ord` or using `partial_cmp` in a situation that
demands that.
Add explicit "Derivable" and "How can I implement `Default`" sections.
Copied relevant sections from the module-level documentation, but also
linked to there-- it has a more comprehensive narrative with examples
that show implementation AND use. Decided to just put implementation
example in the trait documentation.
I had already copied the implementation example in a previous commit;
this copies the explanation and usage examples to the general trait
description.
By accident, I found the `make tips` target, which helped me to gain more insight on how to work with the system more quickly.
srinivasreddy and others added 11 commits May 27, 2016 08:06
Fix `asm-misplaced-option` on ARM/AArch64

This fixes rust-lang#33737. Of course, since we don't run `make check` for ARM cross builds, you probably won't notice it.
…larifications, r=steveklabnik

Trait documentation clarifications

Hi! I've felt a bit of friction lately in figuring out how to write custom implementations of the `derive`able traits, so I decided to add to the docs :)

The docs for `Copy` are already excellent-- clear, useful sections that I only reordered a bit-- they're now:

* General explanation
* When can my type be `Copy`?
* When can my type _not_ be `Copy`?
* When should my type be `Copy`?
* Derivable
* How can I implement `Copy`?

I didn't add all these sections for all the traits, but I did make sure all the derivable traits had a consistent "Derivable" section that explained what the derived implementation does and a "How can I implement" section that has an example.

Please check me for correctness-- I tried to do research to make sure I was saying accurate things but I'm still learning! ❤️ I'd also love suggestions on information to add that is still missing-- I think these traits are important and deserve to have awesome docs!
…veklabnik

Fix invalid background color in stability elements

r? @steveklabnik
Point out the clone operation in summary line docs of `Vec::extend_from_slice`
Fix ICE on parsing a bad metavariable in a macro definition

Fixes rust-lang#33569, fixes rust-lang#33728.
r? @pnkfelix
Add `make tips` as useful make target

By accident, I found the `make tips` target, which helped me to gain more insight on how to work with the system more quickly.
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=1

@bors
Copy link
Contributor

bors commented May 27, 2016

📌 Commit 2c4fd94 has been approved by GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Contributor

bors commented May 27, 2016

⌛ Testing commit 2c4fd94 with merge ab7c35f...

bors added a commit that referenced this pull request May 27, 2016
Rollup of 10 pull requests

- Successful merges: #33753, #33815, #33829, #33858, #33865, #33866, #33870, #33874, #33891, #33898
- Failed merges:
@bors bors merged commit 2c4fd94 into rust-lang:master May 27, 2016
@GuillaumeGomez GuillaumeGomez deleted the rollup branch May 27, 2016 16:15
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.