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

Rollup of 6 pull requests #94453

Merged
merged 14 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
expadn abi check + condese & fix tests
  • Loading branch information
beepster4096 committed Feb 28, 2022
commit d316aba04c4644093ba07d1ec8d334b599b8eb01
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_ssa/src/mir/place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
mir::ProjectionElem::Deref => {
// custom allocators can change box's abi, making it unable to be derefed directly
if cg_base.layout.ty.is_box()
&& matches!(cg_base.layout.abi, Abi::Aggregate { .. })
&& matches!(cg_base.layout.abi, Abi::Aggregate { .. } | Abi::Uninhabited)
{
let ptr = cg_base.project_field(bx, 0).project_field(bx, 0);

Expand Down
6 changes: 0 additions & 6 deletions src/test/ui/box/issue-78459-ice.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// check-pass
// build-pass
#![feature(allocator_api)]

use std::alloc::Allocator;
Expand All @@ -18,5 +18,6 @@ unsafe impl Allocator for BigAllocator {
}

fn main() {
Box::new_in((), &std::alloc::Global);
Box::new_in((), BigAllocator([0; 2]));
}