about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/box/large-allocator-ice.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/box/large-allocator-ice.rs b/src/test/ui/box/large-allocator-ice.rs
index 3ef1171ff50..b3a882ff089 100644
--- a/src/test/ui/box/large-allocator-ice.rs
+++ b/src/test/ui/box/large-allocator-ice.rs
@@ -1,5 +1,6 @@
 // build-pass
 #![feature(allocator_api)]
+#![allow(unused_must_use)]
 
 use std::alloc::Allocator;
 
@@ -20,4 +21,9 @@ unsafe impl Allocator for BigAllocator {
 fn main() {
     Box::new_in((), &std::alloc::Global);
     Box::new_in((), BigAllocator([0; 2]));
+    generic_function(0);
+}
+
+fn generic_function<T>(val: T) {
+    *Box::new_in(val, &std::alloc::Global);
 }