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 #8748 #8913

Merged
merged 1 commit into from
May 31, 2022
Merged

Fix #8748 #8913

merged 1 commit into from
May 31, 2022

Conversation

b-ncMN
Copy link
Contributor

@b-ncMN b-ncMN commented May 29, 2022

Thank you for making Clippy better!

changelog: Fix ICE #8748 in shadow.rs

@rust-highfive
Copy link

r? @giraffate

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 29, 2022
@b-ncMN
Copy link
Contributor Author

b-ncMN commented May 29, 2022

Fixes #8748

@b-ncMN
Copy link
Contributor Author

b-ncMN commented May 29, 2022

This is a temporary fix that I propose to fix the ICE,
It is probable we could go further and make the code that ICE actually lint

fn main() {
    let _ = [0; {
        let x = 1;
        if let Some(x) = Some(1) { x } else { 1 }
    }];
}

but, I'm not unsure whether or not this code can actually be linted at all

I also propose this fix now because I'm not coding much atm and I didn't want to let the ICE unfixed for too long

@b-ncMN b-ncMN force-pushed the ICE-#8748 branch 2 times, most recently from 5841dbf to 4b0a829 Compare May 29, 2022 20:26
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can an ICE test case in #8748 be added?

@b-ncMN
Copy link
Contributor Author

b-ncMN commented May 30, 2022

Can an ICE test case in #8748 be added?

I'll do it when coming home from work 👍

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented May 31, 2022

📌 Commit 0a7f19b has been approved by giraffate

@bors
Copy link
Contributor

bors commented May 31, 2022

⌛ Testing commit 0a7f19b with merge 588e198...

@bors
Copy link
Contributor

bors commented May 31, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 588e198 to master...

@bors bors merged commit 588e198 into rust-lang:master May 31, 2022
@b-ncMN b-ncMN deleted the ICE-#8748 branch June 4, 2022 23:00
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.

4 participants