Skip to content
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

Rollup of 9 pull requests #65793

Merged
merged 41 commits into from
Oct 25, 2019
Merged

Rollup of 9 pull requests #65793

merged 41 commits into from
Oct 25, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Oct 25, 2019

Successful merges:

Failed merges:

r? @ghost

XiangQingW and others added 30 commits October 22, 2019 00:08
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
This commit modifies the uninhabitedness checking so that the fields of
a non-exhaustive variant (which is not local) are ignored if they are
uninhabited. This is an improvement over the previous behaviour which
considered all non-local non-exhaustive variants useful because
unreachable patterns are now detected.

Signed-off-by: David Wood <david@davidtw.co>
Add test for rejecting `trait A: B1 = B2;`.
Also test rejection of `trait A: = B;`.
Also elaborate on some feature gates in `active.rs`.
Change-Id: Ib3a396e7334d209fe6c6ef425bbfc7b2ae471378
The iterator is implemented using const generics. It implements the
traits `Iterator`, `DoubleEndedIterator`, `ExactSizeIterator`,
`FusedIterator` and `TrustedLen`. It also contains a public method
`new` to create it from an array.

`IntoIterator` was not implemented for arrays yet, as there are still
some open questions regarding backwards compatibility. This commit
only adds the iterator impl and does not yet offer a convenient way
to obtain that iterator.
Many tests are based on tests by Josh Stone <cuviper@gmail.com>
This it to make sure traits are implemented for arrays with length 32
and below, while they are not implemented for >= 33.
Guanqun Lu and others added 11 commits October 24, 2019 23:54
…=scottmcm

Add by-value iterator for arrays

This adds an iterator that can iterate over arrays by value, yielding all elements by value. However, **this PR does _not_ add a corresponding `IntoIterator` impl for arrays**. The `IntoIterator` impl needs some discussion about backwards-compatibility that should take place in a separate PR. With this patch, this code should work (but there is currently still a bug):

```rust
#![feature(array_value_iter)]
use std::array::IntoIter;

let arr = [1, 2, 3];
for x in IntoIter::new(arr) {
    println!("{}", x);
}
```

**TODO**:
- [x] Get initial feedback
- [x] Add tests
- [x] Figure out why stage1 produces weird bugs ([comment](rust-lang#62959 (comment)))
- [x] Add UI tests as mentioned [here](rust-lang#62959 (comment)) (will do that soon-ish)
- [x] Fix [this new bug](rust-lang#62959 (comment))

**Notes for reviewers**
- Is the use of `MaybeUninit` correct here? I think it has to be used due to the `Clone` impl which has to fill the dead array elements with something, but cannot fill it with a correct instance.
- Are the unit tests sufficient?

CC rust-lang#25725
…-E0576, r=matthewjasper,kinnison

Add long error explanation for E0576

Part of rust-lang#61137.
…k-Simulacrum

reorder config.toml.example options and add one missing option

r? @Mark-Simulacrum
…e-always-useful, r=varkor

ignore uninhabited non-exhaustive variant fields

Fixes rust-lang#65157.

This PR modifies the uninhabitedness checking so that the fields of
a non-exhaustive variant (which is not local) are ignored if they are
uninhabited. This is an improvement over the previous behaviour which
considered all non-local non-exhaustive variants useful because
unreachable patterns are now detected.

r? @arielb1
cc @varkor
Deprecated proc_macro doesn't trigger warning on build library

Fix rust-lang#65189
…r=davidtwco

Pre-expansion gate most of the things

This is a subset of rust-lang#64672. A crater run has already been done and this PR implements conclusions according to rust-lang#64672 (comment).

r? @davidtwco
cc @petrochenkov
Adjust the tracking issue for `untagged_unions`.

Makes rust-lang#55149 the new tracking issue for `untagged_unions`.
Closes rust-lang#32836 which is the old tracking issue.

r? @varkor
Changed APIT with explicit generic args span to specific arg spans

Fixes rust-lang#65642.
@Centril
Copy link
Contributor Author

Centril commented Oct 25, 2019

@bors r+ p=9 rollup=never

@bors
Copy link
Contributor

bors commented Oct 25, 2019

📌 Commit 100c924 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 Oct 25, 2019
@Centril Centril added the rollup A PR which is a rollup label Oct 25, 2019
@bors
Copy link
Contributor

bors commented Oct 25, 2019

⌛ Testing commit 100c924 with merge dd2df8f...

bors added a commit that referenced this pull request Oct 25, 2019
Rollup of 9 pull requests

Successful merges:

 - #62959 (Add by-value iterator for arrays )
 - #65390 (Add long error explanation for E0576)
 - #65408 (reorder config.toml.example options and add one missing option)
 - #65414 (ignore uninhabited non-exhaustive variant fields)
 - #65666 (Deprecated proc_macro doesn't trigger warning on build library)
 - #65742 (Pre-expansion gate most of the things)
 - #65747 (Adjust the tracking issue for `untagged_unions`.)
 - #65763 (Changed APIT with explicit generic args span to specific arg spans)
 - #65775 (Fix more `ReEmpty` ICEs)

Failed merges:

 - #65519 (trait-based structural match implementation)

r? @ghost
@bors
Copy link
Contributor

bors commented Oct 25, 2019

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

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

8 participants