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

Don't panic on invalid shift while constfolding #9464

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

lukaslueg
Copy link
Contributor

Instead of panicking on invalid shifts while folding constants we simply give up. Fixes #9463

Notice the "attempt to shift right by 1316134912_u32", which seems weird. AFAICS it comes from rustc itself.

changelog: none

@rust-highfive
Copy link

r? @dswij

(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 Sep 11, 2022
Copy link
Member

@dswij dswij left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix

@dswij
Copy link
Member

dswij commented Sep 12, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 12, 2022

📌 Commit 1e23c65 has been approved by dswij

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Sep 12, 2022

⌛ Testing commit 1e23c65 with merge 7b8c4a9...

@bors
Copy link
Collaborator

bors commented Sep 12, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: dswij
Pushing 7b8c4a9 to master...

@bors bors merged commit 7b8c4a9 into rust-lang:master Sep 12, 2022
@lukaslueg lukaslueg deleted the issue9463 branch September 12, 2022 17:09
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.

ICE: invalid shift: TryFromIntError(())', src/tools/clippy/clippy_utils/src/consts.rs:504:70
4 participants