diff options
| author | DrMeepster <19316085+DrMeepster@users.noreply.github.com> | 2022-03-25 23:14:30 -0700 |
|---|---|---|
| committer | DrMeepster <19316085+DrMeepster@users.noreply.github.com> | 2022-03-25 23:16:23 -0700 |
| commit | 46dadfc1422ce98f4814441154d5fa765caeffe9 (patch) | |
| tree | d28adf7c7fafc8aa3033c686783a5e78f34aeca7 /src/test/ui/box | |
| parent | d4acac935b6dd6413964b068421d8d12441f702e (diff) | |
| download | rust-46dadfc1422ce98f4814441154d5fa765caeffe9.tar.gz rust-46dadfc1422ce98f4814441154d5fa765caeffe9.zip | |
widen special case on deref to all non-zst allocators
Diffstat (limited to 'src/test/ui/box')
| -rw-r--r-- | src/test/ui/box/issue-95036.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/box/issue-95036.rs b/src/test/ui/box/issue-95036.rs new file mode 100644 index 00000000000..e062599d74c --- /dev/null +++ b/src/test/ui/box/issue-95036.rs @@ -0,0 +1,10 @@ +// compile-flags: -O +// compile-pass + +#![feature(allocator_api, bench_black_box)] + +pub fn main() { + let mut node = Box::new_in([5u8], &std::alloc::Global); + node[0] = 7u8; + std::hint::black_box(node); +} |
