Skip to content

Fix #8748 - #8913

Merged
bors merged 1 commit into
masterfrom
unknown repository
May 31, 2022
Merged

bors merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented May 29, 2022 •

Copy link
Copy Markdown

Thank you for making Clippy better!

changelog: Fix ICE #8748 in shadow.rs

@rust-highfive

Copy link
Copy Markdown

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
@ghost

ghost commented May 29, 2022

Copy link
Copy Markdown
Author

Fixes #8748

@ghost

ghost commented May 29, 2022 •

Copy link
Copy Markdown
Author

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

@giraffate giraffate left a comment

Copy link
Copy Markdown
Contributor

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?

Comment thread clippy_lints/src/shadow.rs Resolved
@ghost

ghost commented May 30, 2022

Copy link
Copy Markdown
Author

Can an ICE test case in #8748 be added?

I'll do it when coming home from work 👍

@giraffate

Copy link
Copy Markdown
Contributor

@bors r+

Thanks!

@bors

bors commented May 31, 2022

Copy link
Copy Markdown
Contributor

📌 Commit 0a7f19b has been approved by giraffate

@bors

bors commented May 31, 2022

Copy link
Copy Markdown
Contributor

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

@bors

bors commented May 31, 2022

Copy link
Copy Markdown
Contributor

☀️ 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
@ghost
ghost 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.

3 participants