Skip to content
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 4 pull requests #61983

Merged
merged 13 commits into from
Jun 20, 2019
Merged

Rollup of 4 pull requests #61983

merged 13 commits into from
Jun 20, 2019

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jun 20, 2019

Successful merges:

Failed merges:

r? @ghost

timvermeulen and others added 13 commits May 25, 2019 01:47
Add custom nth_back to Skip

Implementation of nth_back for Skip.
Part of rust-lang#54054
…=scottmcm

Implement nth_back for slice::{Iter, IterMut}

Part of rust-lang#54054.

I implemented `nth_back` as straightforwardly as I could, and then slightly changed `nth` to match `nth_back`. I believe I did so correctly, but please double-check 🙂

I also added the helper methods `zst_shrink`, `next_unchecked`, and `next_back_unchecked` to get rid of some duplicated code. These changes hopefully make this code easier to understand for new contributors like me.

I noticed the `is_empty!` and `len!` macros which sole purpose seems to be inlining, according to the comment right above them, but the `is_empty` and `len` methods are already marked with `#[inline(always)]`. Does that mean we could replace these macros with method calls, without affecting anything? I'd love to get rid of them.
…_syntax, r=estebank

suggest tuple struct syntax

refs rust-lang#57242
rustc: disallow cloning HIR nodes.

Besides being inefficient, cloning also risks creating broken HIR (without properly recreating all the IDs and whatnot, in which case you might as well reconstruct the entire node without ever `Clone`-ing anything).

We detect *some* detrimental situations (based on the occurrence of `HirId`s, I believe?), but it's better to statically disallow it, IMO.

One of the examples that is fixed by this PR is `tcx.hir().fn_decl{,_by_hir_id}`, which was cloning an entire `hir::FnDecl` *every single time it was called*.

r? @petrochenkov cc @rust-lang/compiler
@Centril
Copy link
Contributor Author

Centril commented Jun 20, 2019

@bors r+ p=4

@bors
Copy link
Contributor

bors commented Jun 20, 2019

📌 Commit 942a7fe 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 Jun 20, 2019
@bors
Copy link
Contributor

bors commented Jun 20, 2019

⌛ Testing commit 942a7fe with merge 4fb77a0...

bors added a commit that referenced this pull request Jun 20, 2019
Rollup of 4 pull requests

Successful merges:

 - #60454 (Add custom nth_back to Skip)
 - #60772 (Implement nth_back for slice::{Iter, IterMut})
 - #61782 (suggest tuple struct syntax)
 - #61968 (rustc: disallow cloning HIR nodes.)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Jun 20, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: Centril
Pushing 4fb77a0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 20, 2019
@bors bors merged commit 942a7fe into rust-lang:master Jun 20, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #61983!

Tested on commit 4fb77a0.
Direct link to PR: #61983

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

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Jun 20, 2019
Tested on commit rust-lang/rust@4fb77a0.
Direct link to PR: <rust-lang/rust#61983>

💔 clippy-driver on windows: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk @phansch, @rust-lang/infra).
@Centril Centril deleted the rollup-wnfo07y branch June 20, 2019 10:41
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants