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 8 pull requests #40806

Merged
merged 20 commits into from
Mar 25, 2017
Merged

Rollup of 8 pull requests #40806

merged 20 commits into from
Mar 25, 2017

Conversation

nikomatsakis and others added 20 commits March 22, 2017 11:13
… r=nikomatsakis"

This reverts commit dc0bb3f, reversing
changes made to e879aa4.

This is a temporary step intended to fix regressions. A more
comprehensive fix for type inference and dead-code is in the works.
This replaces the `std::collections::hash::table::RevMoveBuckets`
iterator with a simpler `while` loop.  This iterator was only used for
dropping the remaining elements of a `RawTable`, so instead we can just
loop through directly and drop them in place.

This should be functionally equivalent to the former code, but a little
easier to read.  I was hoping it might have some performance benefit
too, but it seems the optimizer was already good enough to see through
the iterator -- the generated code is nearly the same.  Maybe it will
still help if an element type has more complicated drop code.
`IntoIter::drop` already iterates.
An empty line between the "Basic usage:" text and the example is required to
properly format the code. Without the empty line, the example is not formatted
as code.
…and::envs().

The person who originally wrote the example forgot to include this attribute.
This caused Travis CI to fail on commit 9b0a4a4 (rust-lang#40794), which just fixed
formatting in the description of std::process::Command::envs().
Changed link to documentation issues from A-docs to T-doc as this has just been migrated.
Added a link to the documentation style guidelines.
Fix for rust-lang#39596: sort Trait2 before Trait10.

This is a change discussed in rust-lang#39596. Essentially, item names will be sorted as if they're (&str, u64) pairs instead of just `&str`, meaning that `"Apple" < "Banana"` and also `"Fruit10" > "Fruit2"`.

Sample sorting:

1. Apple
2. Banana
3. Fruit
4. Fruit0
5. Fruit00
6. Fruit1
7. Fruit01
8. Fruit2
9. Fruit02
10. Fruit20
11. Fruit100
12. Pear

Examples of generated documentation:
https://docs.charr.xyz/before-doc/test_sorting/
https://docs.charr.xyz/after-doc/test_sorting/

Screenshots of generated documentation:
Before: http://imgur.com/Ktb10ti
After: http://imgur.com/CZJjqIN
Represent function pointers in mir-constants as a Value instead of Item

r? @eddyb
Revert rust-lang#39485, fixing type-inference regressions

This reverts PR rust-lang#39485, which should fix the immediate regressions. Eventually I'd like to land rust-lang#40224 -- or some variant of it -- which revisits the question fo dead-code and inference.

r? @eddyb
cc @canndrew
Simplify hash table drops

This replaces the `std::collections::hash::table::RevMoveBuckets`
iterator with a simpler `while` loop.  This iterator was only used for
dropping the remaining elements of a `RawTable`, so instead we can just
loop through directly and drop them in place.

This should be functionally equivalent to the former code, but a little
easier to read.  I was hoping it might have some performance benefit
too, but it seems the optimizer was already good enough to see through
the iterator -- the generated code is nearly the same.  Maybe it will
still help if an element type has more complicated drop code.
…chton

Unnecessary iteration in BTreeMap::drop

`IntoIter::drop` already iterates.
…vs-docs, r=steveklabnik

Fix formatting in the docs for std::process::Command::envs()

An empty line between the *Basic usage:* text and the example is required to properly format the code. Without the empty line, the example is not formatted as code.

[Here](https://doc.rust-lang.org/std/process/struct.Command.html#method.envs) you can see the current (improper) formatting.
…klabnik

Update CONTRIBUTING.md regarding documentation contributions

Changed link to documentation issues from A-docs to T-doc as this has just been migrated.
Added a link to the documentation style guidelines in RFC 1574 (I've linked to [Appendix A][1] specifically since that's the combined version).

r? @steveklabnik

[1]: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (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.

@frewsxcv
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Mar 24, 2017

📌 Commit 6cd4660 has been approved by frewsxcv

@bors
Copy link
Contributor

bors commented Mar 24, 2017

⌛ Testing commit 6cd4660 with merge 49c67bd...

bors added a commit that referenced this pull request Mar 24, 2017
Rollup of 8 pull requests

- Successful merges: #40567, #40602, #40636, #40739, #40756, #40790, #40794, #40803
- Failed merges:
@bors
Copy link
Contributor

bors commented Mar 25, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: frewsxcv
Pushing 49c67bd to master...

@bors bors merged commit 6cd4660 into rust-lang:master Mar 25, 2017
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.