]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const_evaluatable/function-call.rs
3 const fn foo
<T
>() -> usize {
4 // We might instead branch on `std::mem::size_of::<*mut T>() < 8` here,
5 // which would cause this function to fail on 32 bit systems.
7 std
::mem
::size_of
::<T
>()
14 let _
= [0; foo
::<T
>()];
15 //~^ WARN cannot use constants which depend on generic parameters in types
16 //~| WARN this was previously accepted by the compiler but is being phased out