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

Fix subslice capture in closure #109680

Merged
merged 1 commit into from
Mar 31, 2023
Merged

Conversation

clubby789
Copy link
Contributor

Fixes #109298 by refining captures in the same way for Subslices and Indexes. The comment // we never capture this seems to have been inaccurate, as changing it to an assert causes many test failures

@rustbot label +A-closures

@rustbot
Copy link
Collaborator

rustbot commented Mar 27, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-closures Area: closures (`|args| { .. }`) labels Mar 27, 2023
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Mar 31, 2023

📌 Commit f995003 has been approved by davidtwco

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 31, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 31, 2023
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2)
 - rust-lang#109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`)
 - rust-lang#109680 (Fix subslice capture in closure)
 - rust-lang#109798 (fluent_messages macro: don't emit the OS error in a note)
 - rust-lang#109805 (Source map cleanups)
 - rust-lang#109818 (rustdoc: Add GUI test for jump to collapsed item)
 - rust-lang#109820 (rustdoc-search: update docs for comma in `?` help popover)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 45fcb6f into rust-lang:master Mar 31, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-closures Area: closures (`|args| { .. }`) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE Subslice unexpected because it isn't captured --edition=2021
4 participants