]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/trait-with-dst.rs
1 // build-pass (FIXME(62277): could be check-pass?)
4 struct VTable
<DST
: ?Sized
> {
5 _to_dst_ptr
: fn(*mut ()) -> *mut DST
,
8 trait HasVTableFor
<DST
: ?Sized
+ '
static> {
9 const VTABLE
: &'
static VTable
<DST
>;
12 impl<T
, DST
: ?Sized
+ '
static> HasVTableFor
<DST
> for T
{
13 const VTABLE
: &'
static VTable
<DST
> = &VTable
{
14 _to_dst_ptr
: |_
: *mut ()| unsafe { std::mem::zeroed() }
,
18 pub fn push
<DST
: ?Sized
+ '
static, T
>() {
19 <T
as HasVTableFor
<DST
>>::VTABLE
;