]>
git.proxmox.com Git - rustc.git/blob - tests/ui/const-generics/generic_const_exprs/eval-privacy.rs
2 #![feature(generic_const_exprs)]
3 #![allow(incomplete_features)]
5 pub struct Const
<const U
: u8>;
9 fn assoc_fn() -> Self::AssocTy
;
12 impl<const U
: u8> Trait
for Const
<U
> // OK, trait impl predicates
14 Const
<{ my_const_fn(U) }
>: ,
16 type AssocTy
= Const
<{ my_const_fn(U) }
>;
17 //~^ ERROR private type
18 fn assoc_fn() -> Self::AssocTy
{
23 const fn my_const_fn(val
: u8) -> u8 {
24 // body of this function doesn't matter