]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/union/union-manuallydrop-rpass.rs
1 #![feature(untagged_unions)]
5 use std
::mem
::needs_drop
;
6 use std
::mem
::ManuallyDrop
;
10 impl Drop
for NeedDrop
{
16 value
: ManuallyDrop
<T
>,
20 value
: ManuallyDrop
<NeedDrop
>,
24 union UnionOk3
<T
: Copy
> {
31 trait ImpliesCopy
: Copy { }
34 union UnionOk4
<T
: ImpliesCopy
> {
39 // NeedDrop should not make needs_drop true
40 assert
!(!needs_drop
::<UnionOk1
<NeedDrop
>>());
41 assert
!(!needs_drop
::<UnionOk3
<&dyn Foo
>>());