-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 10 pull requests #70275
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
…tch_single_binding)
As discussed in rust-lang#67939, this allows turning Option<ThreadId> into Option<NonZeroU64> which can then be stored inside an AtomicU64.
…tely (clippy::let_and_return)
…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).
@bors r+ rollup=never p=10 |
📌 Commit 69c0bcd has been approved by |
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
☀️ Test successful - checks-azure |
📣 Toolstate changed by #70275! Tested on commit 1902d1e. 💔 rustfmt on windows: 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).
This was referenced Mar 22, 2020
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
StringReader::retokenize
called on external files. #70172 (parse/lexer: supportStringReader::retokenize
called on external files.)for<'a> |...| body
closures #70209 (parser: recover onfor<'a> |...| body
closures)Failed merges:
r? @ghost