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 11 pull requests #54859

Merged
merged 38 commits into from
Oct 6, 2018
Merged

Rollup of 11 pull requests #54859

merged 38 commits into from
Oct 6, 2018

Conversation

pietroalbini
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

GabrielMajeri and others added 30 commits September 27, 2018 20:13
Provides an overview on why synchronization is required,
as well a short summary of what sync primitives are available.
Because `fn main()` was added automatically, the variables
were actually local statics.
Reword the lead paragraph and turn the list items into
complete sentences.
This property was introduced by 3f92ff3, but looks it doesn't
overwrap even without the property.

Fixes rust-lang#54672.
This reverts commit 21d2a6c.
This reverts commit 1908892.
Removes unnecessary type mismatch error from test that was hiding
borrow check error from NLL stderr.
…teveklabnik

Expand the documentation for the `std::sync` module

I've tried to expand the documentation for Rust's synchronization primitives. The module level documentation explains why synchronization is required when working with a multiprocessor system,
and then links to the appropiate structure in this module.

Fixes rust-lang#29377, since this should be the last item on the checklist (documentation for `Atomic*` was fixed in rust-lang#44854, but not ticked off the checklist).
Cleanup rustc/ty part 1

Part 2 will follow soon; I wouldn't want these changes to rot too quickly.

- improve stack shifting and remove related allocations
- move a faster early return up
- improve allocations
- use Cow<str> where applicable
- simplify common patterns
- whitespace fixes
Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs

This adds two examples to the docs of `TyKind::FnDef` and `TyKind::FnPtr`.

I found these two types a bit confusing when I learned about them and I think adding these examples might help others.
…nikomatsakis

Only warn about unused `mut` in user-written code

Fixes rust-lang#54586.

r? @pnkfelix
cc @blitzerr
add suggestion for inverted function parameters

Fixes rust-lang#54065.
…pe-with-lifetime, r=nikomatsakis

Regression test for rust-lang#32382.
make `Parser::parse_foreign_item()` return a foreign item or error

Fixes `Parser::parse_foreign_item()` to follow the convention of `parse_trait_item()` and `parse_impl_item()` in that it *must* parse an item or return an error, and then the caller is responsible for detecting the closing delimiter.

This prevents it from looping endlessly on an unexpected token in `ext/expand.rs` where it was also leaking memory by continually pushing to `Parser::expected_tokens` via `Parser::check_keyword()`.

closes rust-lang#54441

r? @petrochenkov
cc @dtolnay
…omez

rustdoc: overflow:auto doesn't work nicely on small screens

This property was introduced by 3f92ff3, but looks it doesn't
overwrap even without the property.

Fixes rust-lang#54672.
Fix typo in src/libsyntax/parse/parser.rs

contast -> contrast
…ckler

Fix a regression in 1.30 by reverting rust-lang#53564

Investigation on rust-lang#54477 revealed rust-lang#53564 as the culprit in the regression for that crate. I've reproduced the regression with the [detailed test cases provided](rust-lang#54477 (comment)). While we figure out how to fix the regression this commit reverts the current culprit.
…ime-suggestion-test, r=nikomatsakis

Remove unneccessary error from test, revealing NLL error.

Part of rust-lang#52663.

Removes unnecessary type mismatch error from test that was hiding
borrow check error from NLL stderr.

r? @nikomatsakis
@pietroalbini
Copy link
Member Author

@bors r+ p=11

@bors
Copy link
Contributor

bors commented Oct 5, 2018

📌 Commit 51334c9 has been approved by pietroalbini

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 5, 2018
@bors
Copy link
Contributor

bors commented Oct 6, 2018

⌛ Testing commit 51334c9 with merge ac841e7...

bors added a commit that referenced this pull request Oct 6, 2018
Rollup of 11 pull requests

Successful merges:

 - #54078 (Expand the documentation for the `std::sync` module)
 - #54717 (Cleanup rustc/ty part 1)
 - #54781 (Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs)
 - #54787 (Only warn about unused `mut` in user-written code)
 - #54804 (add suggestion for inverted function parameters)
 - #54812 (Regression test for #32382.)
 - #54833 (make `Parser::parse_foreign_item()` return a foreign item or error)
 - #54834 (rustdoc: overflow:auto doesn't work nicely on small screens)
 - #54838 (Fix typo in src/libsyntax/parse/parser.rs)
 - #54851 (Fix a regression in 1.30 by reverting #53564)
 - #54853 (Remove unneccessary error from test, revealing NLL error.)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Oct 6, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: pietroalbini
Pushing ac841e7 to master...

@bors bors merged commit 51334c9 into rust-lang:master Oct 6, 2018
@pietroalbini pietroalbini deleted the rollup branch October 6, 2018 07:11
@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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.