diff options
| author | DrMeepster <19316085+DrMeepster@users.noreply.github.com> | 2022-03-11 17:00:56 -0800 |
|---|---|---|
| committer | DrMeepster <19316085+DrMeepster@users.noreply.github.com> | 2022-03-11 17:00:56 -0800 |
| commit | 9d72dd54d0fac28e3611ff553edbbd695f6e8357 (patch) | |
| tree | 33871edc0c4ba45ef44af6ae9d88fab394f84b39 /src/test/ui/box | |
| parent | c5a43b8d3917d15b30b7d99021540cf7831f4182 (diff) | |
| download | rust-9d72dd54d0fac28e3611ff553edbbd695f6e8357.tar.gz rust-9d72dd54d0fac28e3611ff553edbbd695f6e8357.zip | |
fix another assumption about box
Diffstat (limited to 'src/test/ui/box')
| -rw-r--r-- | src/test/ui/box/large-allocator-ice.rs | 6 |
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); } |
