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 a crash when transmuting non-immediate to immediate types #7991

Closed
wants to merge 1 commit into from

Conversation

dotdash
Copy link
Contributor

@dotdash dotdash commented Jul 23, 2013

The code to build the transmute intrinsic currently makes the invalid
assumption that if the in-type is non-immediate, the out-type is
non-immediate as well. But this is wrong, for example when transmuting
[int, ..1] to int. So we need to handle this fourth case as well.

Fixes #7988

@huonw
Copy link
Member

huonw commented Jul 23, 2013

(Removed my r+ pending adding the test from #7988.)

The code to build the transmute intrinsic currently makes the invalid
assumption that if the in-type is non-immediate, the out-type is
non-immediate as well. But this is wrong, for example when transmuting
[int, ..1] to int. So we need to handle this fourth case as well.

Fixes rust-lang#7988
@thestinger
Copy link
Contributor

Landing as part of #7982.

@thestinger thestinger closed this Jul 24, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 17, 2021
Fix bad suggestion on `option_if_let_else` when there is complex subpat

closes rust-lang#7991

Prefer not warning any complex subpat in `option_if_let_else` rather than suggesting obscure suggestions.

changelog: [`option_if_let_else`] does not warn when complex subpat is present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE when transmuting [T,..1] to T
3 participants