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>
13 //~^ WARN private type
14 //~| WARN this was previously
15 //~| WARN private type
16 //~| WARN this was previously
19 Const<{ my_const_fn(U) }>: ,
21 type AssocTy = Const<{ my_const_fn(U) }>;
22 //~^ ERROR private type
23 fn assoc_fn() -> Self::AssocTy {
28 const fn my_const_fn(val: u8) -> u8 {
29 // body of this function doesn't matter