]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/issue-102117.rs
1 #![feature(inline_const, const_type_id)]
3 use std
::alloc
::Layout
;
5 use std
::mem
::transmute
;
6 use std
::ptr
::drop_in_place
;
11 drop_in_place
: unsafe fn(*mut ()),
15 pub fn new
<T
>() -> &'
static Self {
17 //~^ ERROR the parameter type `T` may not live long enough
18 //~| ERROR the parameter type `T` may not live long enough
20 layout
: Layout
::new
::<T
>(),
21 type_id
: TypeId
::of
::<T
>(),
22 drop_in_place
: unsafe {
23 transmute
::<unsafe fn(*mut T
), unsafe fn(*mut ())>(drop_in_place
::<T
>)