Skip to content

Rollup of 9 pull requests #68893

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 21 commits into from
Feb 6, 2020
Merged

Rollup of 9 pull requests #68893

merged 21 commits into from
Feb 6, 2020

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost

euclio and others added 21 commits February 4, 2020 17:08
The lint message will now use the full, correct path to the `Debug`
trait, even in `no_std`.
also refactor `FnKind` and `visit_assoc_item` visitors
…ionForest, r=nikomatsakis

Remove `RefCell` usage from `ObligationForest`.

It's not needed.

This doesn't affect performance, it just simplifies the code a little.

r? @nikomatsakis
…=Centril

Implement `unused_parens` for `const` and `static` items

Fixes rust-lang#67942
…henkov

Towards unified `fn` grammar

Part of rust-lang#68728.

- Syntactically, `fn` items in `extern { ... }` blocks can now have bodies (`fn foo() { ... }` as opposed to `fn foo();`). As above, we use semantic restrictions instead.

- Syntactically, `fn` items in free contexts (directly in a file or a module) can now be without bodies (`fn foo();` as opposed to `fn foo() { ... }`. As above, we use semantic restrictions instead, including for non-ident parameter patterns.

- We move towards unifying the `fn` front matter; this is fully realized in rust-lang#68728.

r? @petrochenkov
…, r=estebank

Make associated item collection a query

Before this change, every time associated items were iterated over (which rustc does *a lot* – this can probably be further optimized), there would be N+1 queries to fetch all assoc. items. Now there's just one after they've been computed once.
…chenkov

use def_path_str for missing_debug_impls message

The lint message will now use the full, correct path to the `Debug`
trait, even in `no_std`.
stop using BytePos for computing spans in librustc_parse/parser/mod.rs

Computing spans using logic such as `self.token.span.lo() + BytePos(1)` can cause internal compiler errors like rust-lang#68730 when non-ascii characters are given as input.

rust-lang#68735 partially addressed this problem, but only for one case. Moreover, its usage of `next_point()` does not actually align with what `bump_with()` expects. For example, given the token `>>=`, we should pass the span consisting of the final two characters `>=`, but `next_point()` advances the span beyond the end of the `=`.

This pull request instead computes the start of the new span by doing `start_point(self.token.span).hi()`. This matches `self.token.span.lo() + BytePos(1)` in the common case where the characters are ascii, and it gracefully handles multibyte characters.

Fixes rust-lang#68783.
@Dylan-DPC-zz
Copy link
Author

@bors r+ p=9 rollup=never

@bors
Copy link
Collaborator

bors commented Feb 6, 2020

📌 Commit 1ad674a 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 Feb 6, 2020
@Dylan-DPC-zz Dylan-DPC-zz added the rollup A PR which is a rollup label Feb 6, 2020
@bors
Copy link
Collaborator

bors commented Feb 6, 2020

⌛ Testing commit 1ad674a with merge 442ae7f...

bors added a commit that referenced this pull request Feb 6, 2020
Rollup of 9 pull requests

Successful merges:

 - #68691 (Remove `RefCell` usage from `ObligationForest`.)
 - #68751 (Implement `unused_parens` for `const` and `static` items)
 - #68788 (Towards unified `fn` grammar)
 - #68837 (Make associated item collection a query)
 - #68842 (or_patterns: add regression test for #68785)
 - #68844 (use def_path_str for missing_debug_impls message)
 - #68845 (stop using BytePos for computing spans in librustc_parse/parser/mod.rs)
 - #68869 (clean up E0271 explanation)
 - #68880 (Forbid using `0` as issue number)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented Feb 6, 2020

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 6, 2020
@bors bors merged commit 1ad674a into rust-lang:master Feb 6, 2020
@rust-highfive
Copy link
Contributor

📣 Toolstate changed by #68893!

Tested on commit 442ae7f.
Direct link to PR: #68893

💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Feb 6, 2020
Tested on commit rust-lang/rust@442ae7f.
Direct link to PR: <rust-lang/rust#68893>

💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.