-
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 9 pull requests #65793
Merged
Merged
Rollup of 9 pull requests #65793
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
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 <[email protected]>
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 <[email protected]>
This it to make sure traits are implemented for arrays with length 32 and below, while they are not implemented for >= 33.
…=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.
Fix more `ReEmpty` ICEs closes rust-lang#65553 r? @pnkfelix
@bors r+ p=9 rollup=never |
📌 Commit 100c924 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
Oct 25, 2019
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
☀️ Test successful - checks-azure |
This was referenced Oct 25, 2019
Merged
This was referenced Oct 26, 2019
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.
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.
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:
untagged_unions
. #65747 (Adjust the tracking issue foruntagged_unions
.)ReEmpty
ICEs #65775 (Fix moreReEmpty
ICEs)Failed merges:
r? @ghost