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 panic with closure inside array len #16045

Merged
merged 1 commit into from Dec 7, 2023

Conversation

HKalbasi
Copy link
Member

@HKalbasi HKalbasi commented Dec 7, 2023

I was working on #15947 and found out that we panic on this test:

fn main() {
    let x = [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
}

This PR fixes the panic. Closures in array len are still broken, but closure in const eval is not stable anyway.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2023
@HKalbasi
Copy link
Member Author

HKalbasi commented Dec 7, 2023

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 7, 2023

📌 Commit c11a002 has been approved by HKalbasi

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Dec 7, 2023

⌛ Testing commit c11a002 with merge 4196675...

@bors
Copy link
Collaborator

bors commented Dec 7, 2023

☀️ Test successful - checks-actions
Approved by: HKalbasi
Pushing 4196675 to master...

@bors bors merged commit 4196675 into rust-lang:master Dec 7, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants