2023-03-19 02:17:44 +00:00
|
|
|
//@ incremental
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
|
|
trait Q {
|
|
|
|
|
const ASSOC: usize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<const N: u64> Q for [u8; N] {
|
2024-07-16 19:07:36 -07:00
|
|
|
//~^ ERROR: the constant `N` is not of type `usize`
|
2023-03-19 02:17:44 +00:00
|
|
|
const ASSOC: usize = 1;
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-29 17:06:50 +01:00
|
|
|
pub fn test() -> [u8; <[u8; 13] as Q>::ASSOC] {
|
|
|
|
|
//~^ ERROR: the constant `13` is not of type `u64`
|
|
|
|
|
todo!()
|
|
|
|
|
}
|