about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-17 23:01:01 +0100
committerGitHub <noreply@github.com>2022-02-17 23:01:01 +0100
commit6dc62f421dcfb14f10a658de40c5140a083b3aed (patch)
tree89606976363275711421702396354706e477cae8 /src/test
parenta4be35e3217e85e35693837cac5bdc8285add15a (diff)
parentd0b508e1a7d7f0408a782193c78e7b2ee052ef3b (diff)
downloadrust-6dc62f421dcfb14f10a658de40c5140a083b3aed.tar.gz
rust-6dc62f421dcfb14f10a658de40c5140a083b3aed.zip
Rollup merge of #94043 - DrMeepster:box_alloc_ice, r=oli-obk
Fix ICE when using Box<T, A> with pointer sized A

Fixes #78459

Note that using `Box<T, A>` with a more than pointer sized `A` or using a pointer sized `A` with a Box of a DST will produce a different ICE (#92054) which is not fixed by this PR.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/box/issue-78459-ice.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/box/issue-78459-ice.rs b/src/test/ui/box/issue-78459-ice.rs
new file mode 100644
index 00000000000..89f75fea15b
--- /dev/null
+++ b/src/test/ui/box/issue-78459-ice.rs
@@ -0,0 +1,6 @@
+// check-pass
+#![feature(allocator_api)]
+
+fn main() {
+    Box::new_in((), &std::alloc::Global);
+}