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 #70275

Merged
merged 29 commits into from
Mar 22, 2020
Merged

Rollup of 10 pull requests #70275

merged 29 commits into from
Mar 22, 2020

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

lukaslueg and others added 29 commits January 10, 2020 19:39
Constructing an Rc/Arc is unsafe even if the wrapped `T`
is never dereferenced.
Future-proof these types in case rustc reorders
the inner fields. As per discussion in PR rust-lang#68099.
As discussed in rust-lang#67939, this allows turning Option<ThreadId> into Option<NonZeroU64> which
can then be stored inside an AtomicU64.
…albertodt

Amend Rc/Arc::from_raw() docs regarding unsafety

[This](https://stackoverflow.com/questions/59671647/is-it-safe-to-clone-a-type-erased-arc-via-raw-pointer) question on SO boils down to "is it safe to `::from_raw()` a `Rc<T>`/`Arc<T>` using a dummy `T` even if `T` is never dereferenced via the new `Rc`/`Arc`?". It almost never is.

This PR amends the docs of `from_raw()` regarding this point.
…trochenkov

parse/lexer: support `StringReader::retokenize` called on external files.

This ~~should theoretically~~ fixes rust-lang#69933, ~~but I'm not sure what the best way to test it is~~.
**EDIT**: see rust-lang#69933 (comment).

r? @petrochenkov cc @Xanewok @staktrace
…trochenkov

parser: recover on `for<'a> |...| body` closures

When encountering `for` and `<` is 1 token ahead, interpret this as an explicitly quantified generic closure and recover, rather than attempting to parse a `for` loop. This provides both improved diagnostics as well as an insurance policy for the ability to use this as the syntax for generic closures in the future.

As requested by r? @eddyb
fix type of const params in associated types.

fixes rust-lang#66906
fixes rust-lang#70167

r? @eddyb
more clippy fixes

* remove unused unit values (clippy::unused_unit)
* make some let-if-bindings more idiomatic (clippy::useless_let_if_seq)
* clarify when we pass () to functions (clippy::unit_arg)
* don't redundantly repeat field names (clippy::redundant_field_names)
* remove redundant returns (clippy::needless_return)
* use let instead of match for matches with single bindings (clippy::match_single_binding)
* don't convert results to options just for matching (clippy::if_let_some_result)
Return NonZeroU64 from ThreadId::as_u64.

As discussed in rust-lang#67939, this allows turning Option<ThreadId> into Option<NonZeroU64> which
can then be stored inside an AtomicU64.
Remove wrong entry from RELEASES.md

resolves rust-lang#70247
Remove another wrong entry from RELEASES.md

The entry is under 1.11.0, but the feature is only available since 1.12.0 (for which an identical entry exists).

![Screenshot_2020-03-22 Support `cfg_attr` on `path` attributes by jseyfried · Pull Request rust-lang#34546 · rust-lang rust](https://user-images.githubusercontent.com/951129/77238862-85c8f580-6bd4-11ea-8d31-77e2994a4b5a.png)
couple more clippy fixes (let_and_return, if_same_then_else)

* summarize if-else-code with identical blocks (clippy::if_same_then_else)
* don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
proc_macro_harness: Use item header spans for errors

Addresses rust-lang#70233 (comment).
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Mar 22, 2020

📌 Commit 69c0bcd has been approved by Dylan-DPC

@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 Mar 22, 2020
@bors
Copy link
Contributor

bors commented Mar 22, 2020

⌛ Testing commit 69c0bcd with merge 1902d1e...

@bors
Copy link
Contributor

bors commented Mar 22, 2020

☀️ Test successful - checks-azure
Approved by: Dylan-DPC
Pushing 1902d1e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 22, 2020
@bors bors merged commit 1902d1e into rust-lang:master Mar 22, 2020
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #70275!

Tested on commit 1902d1e.
Direct link to PR: #70275

💔 rustfmt on windows: test-pass → build-fail (cc @topecongiro).
💔 rustfmt on linux: test-pass → build-fail (cc @topecongiro).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Mar 22, 2020
Tested on commit rust-lang/rust@1902d1e.
Direct link to PR: <rust-lang/rust#70275>

💔 rustfmt on windows: test-pass → build-fail (cc @topecongiro).
💔 rustfmt on linux: test-pass → build-fail (cc @topecongiro).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.