Skip to content

Rollup of 8 pull requests #63074

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 65 commits into from
Jul 28, 2019
Merged

Rollup of 8 pull requests #63074

merged 65 commits into from
Jul 28, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jul 28, 2019

Successful merges:

Failed merges:

r? @ghost

mark-i-m and others added 30 commits July 17, 2019 10:30
Co-Authored-By: kennytm <kennytm@gmail.com>
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: Ralf Jung <post@ralfj.de>
Co-Authored-By: kennytm <kennytm@gmail.com>
- Make sure we ban duplicate '..'.
- Avoid ICEs on PatKind::Rest that doesn't generate HIR nodes.
- Make sure extra `x @ ..` do not cause ICEs.
Centril and others added 18 commits July 28, 2019 06:53
Implement RFC 2707 + Parser recovery for range patterns

Implement rust-lang/rfcs#2707.

- Add a new basic syntactic pattern form `ast::PatKind::Rest` (parsed as `..` or `DOTDOT`) and simplify `ast::PatKind::{Slice, Tuple, TupleStruct}` as a result.

- Lower `ast::PatKind::Rest` in combination with the aforementioned `PatKind` variants as well as `PatKind::Ident`. The HIR remains unchanged for now (may be advisable to make slight adjustments later).

- Refactor `parser.rs` wrt. parsing sequences and lists of things in the process.

- Add parser recovery for range patterns of form `X..`, `X..=`, `X...`, `..Y`, `..=Y`, and `...Y`.
   This should make it easy to actually support these patterns semantically later if we so desire.

cc rust-lang#62254

r? @petrochenkov
…k, r=kennytm

Actually add rustc-guide to toolstate, don't fail builds for the guide

cc @ehuss

r? @kennytm
bump crossbeam-epoch dependency

The new crossbeam-epoch release depends on a memoffset with a whole bunch of soundness holes fixed.

The old memoffset is still indirectly depended on (at least) by rustc-rayon, though -- a crate that looks rather unmaintained (no change in more than a year).
Avoid ICE when referencing desugared local binding in borrow error

To avoid leaking the names of local bindings from expressions like for loops, rust-lang#60984 explicitly ignored them, but an assertion that `LocalKind::Var` *must* have a name would trigger an ICE.

Before this change, the binding generated by desugaring the for loop would leak into the diagnostic (rust-lang#63027):
```
error[E0515]: cannot return value referencing local variable `__next`
  --> return-local-binding-from-desugaring.rs:LL:CC
   |
LL |     for ref x in xs {
   |         ----- `__next` is borrowed here
...
LL |     result
   |     ^^^^^^ returns a value referencing data owned by the current function
```

Ideally `LocalKind` would carry more information to more accurately explain the problem, but for now, in order to avoid the ICE (fix rust-lang#63026), we accept `LocalKind::Var` without a name and produce the following output:

```
error[E0515]: cannot return value referencing local binding
  --> $DIR/return-local-binding-from-desugaring.rs:30:5
   |
LL |     for ref x in xs {
   |                  -- local binding introduced here
...
LL |     result
   |     ^^^^^^ returns a value referencing data owned by the current function
```
…ttmcm

In which we constantly improve the Vec(Deque) array PartialEq impls

Use the same approach as in rust-lang#62435 as sanctioned by rust-lang#61415 (comment).

r? @scottmcm
…albini

Allow rustbot to add `F-*` + `requires-nightly`.

r? @pietroalbini
@Centril
Copy link
Contributor Author

Centril commented Jul 28, 2019

@bors r+ p=8 rollup=never

@bors
Copy link
Collaborator

bors commented Jul 28, 2019

📌 Commit 370aa19 has been approved by Centril

@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 Jul 28, 2019
@bors
Copy link
Collaborator

bors commented Jul 28, 2019

⌛ Testing commit 370aa19 with merge 0cfb2f7...

bors added a commit that referenced this pull request Jul 28, 2019
Rollup of 8 pull requests

Successful merges:

 - #62550 (Implement RFC 2707 + Parser recovery for range patterns)
 - #62759 (Actually add rustc-guide to toolstate, don't fail builds for the guide)
 - #62806 (Fix few Clippy warnings)
 - #62974 (bump crossbeam-epoch dependency)
 - #63051 (Avoid ICE when referencing desugared local binding in borrow error)
 - #63061 (In which we constantly improve the Vec(Deque) array PartialEq impls)
 - #63067 (Add test for issue-50900)
 - #63071 (Allow rustbot to add `F-*` + `requires-nightly`.)

Failed merges:

r? @ghost
@bors
Copy link
Collaborator

bors commented Jul 28, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 0cfb2f7 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 28, 2019
@bors bors merged commit 370aa19 into rust-lang:master Jul 28, 2019
@Centril Centril deleted the rollup-k1a8z0n branch July 28, 2019 17:59
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
# 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.

7 participants