]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/type_of_anon_const.rs
3 #![feature(const_generics)]
4 //~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
6 trait T
<const A
: usize> {
7 fn l
<const N
: bool
>() -> usize;
8 fn r
<const N
: bool
>() -> bool
;
13 impl<const N
: usize> T
<N
> for S
{
14 fn l
<const M
: bool
>() -> usize { N }
15 fn r
<const M
: bool
>() -> bool { M }
19 assert_eq
!(<S
as T
<123>>::l
::<true>(), 123);
20 assert
!(<S
as T
<123>>::r
::<true>());