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 ICE when using Box<T, A> with large A #94414

Merged
merged 2 commits into from
Feb 28, 2022

Conversation

beepster4096
Copy link
Contributor

A sequel to #94043 that fixes #81270 and #92054 (duplicate).

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Feb 27, 2022
@rust-highfive
Copy link
Collaborator

r? @wesleywiser

(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 Feb 27, 2022
src/test/ui/box/issue-81270-ice.rs Outdated Show resolved Hide resolved
compiler/rustc_codegen_ssa/src/mir/place.rs Outdated Show resolved Hide resolved
@tmiasko
Copy link
Contributor

tmiasko commented Feb 28, 2022

Thanks.

@bors r+

@bors
Copy link
Contributor

bors commented Feb 28, 2022

📌 Commit d316aba has been approved by tmiasko

@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 Feb 28, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 28, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#92399 (fix typo in btree/vec doc: Self -> self)
 - rust-lang#92823 (Tweak diagnostics)
 - rust-lang#94248 (Fix ICE when passing block to while-loop condition)
 - rust-lang#94414 (Fix ICE when using Box<T, A> with large A)
 - rust-lang#94445 (4 - Make more use of `let_chains`)
 - rust-lang#94449 (Add long explanation for E0726)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 975a0e0 into rust-lang:master Feb 28, 2022
@rustbot rustbot added this to the 1.61.0 milestone Feb 28, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 28, 2022
Fix yet another Box<T, A> ICE

Fixes rust-lang#95036.

This widens the special case from rust-lang#94414 to make sure that boxes with a custom allocator are never directly dereferenced.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 21, 2022
Remove dereferencing of Box from codegen

Through rust-lang#94043, rust-lang#94414, rust-lang#94873, and rust-lang#95328, I've been fixing issues caused by Box being treated like a pointer when it is not a pointer. However, these PRs just introduced special cases for Box. This PR removes those special cases and instead transforms a deref of Box into a deref of the pointer it contains.

Hopefully, this is the end of the Box<T, A> ICEs.
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 with #![feature(allocator_api)]
6 participants