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 the overflow issue for transmute_generic_consts #112520

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

chenyukang
Copy link
Member

@chenyukang chenyukang commented Jun 11, 2023

Fixes #112505

@rustbot
Copy link
Collaborator

rustbot commented Jun 11, 2023

r? @fee1-dead

(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. labels Jun 11, 2023
LL | unsafe { std::mem::transmute(v) }
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: `[[[u32; 8888888]; 9999999]; 777777777]` (values of the type `[[[u32; 8888888]; 9999999]; 777777777]` are too big for the current architecture)
Copy link
Member Author

Choose a reason for hiding this comment

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

[[[u32; 8888888]; 9999999]; 777777777] comes out 2 times, I think it may be too much for diagnostic.

Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

r=me after nit

compiler/rustc_hir_typeck/src/intrinsicck.rs Show resolved Hide resolved
@chenyukang
Copy link
Member Author

@bors r=fee1-dead

@bors
Copy link
Contributor

bors commented Jun 14, 2023

📌 Commit 3bbc598 has been approved by fee1-dead

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 Jun 14, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 14, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#112197 (Erase regions even if normalization fails in writeback (in new solver))
 - rust-lang#112495 (fix(resolve): update shadowed_glob more precision)
 - rust-lang#112520 (Fix the overflow issue for transmute_generic_consts)
 - rust-lang#112571 (rustdoc-search: search never type with `!`)
 - rust-lang#112581 ([rustdoc] Fix URL encoding of % sign)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 269ea4b into rust-lang:master Jun 14, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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: transmute_generic_consts: Size::bits ... bytes in bits doesn't fit in u64
4 participants