2024-05-29 11:06:50 -05:00
|
|
|
//@ check-pass
|
|
|
|
// If this test starts failing because it ICEs due to not being able to convert a `ReErased` to
|
|
|
|
// something then feel free to just convert this to a known-bug. I'm pretty sure this is still
|
|
|
|
// a failing test, we just started masking the bug.
|
2023-03-01 07:01:12 -06:00
|
|
|
|
|
|
|
#![allow(incomplete_features)]
|
2024-07-14 07:38:51 -05:00
|
|
|
#![feature(adt_const_params, unsized_const_params, generic_const_exprs)]
|
2023-03-01 07:01:12 -06:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
const fn catone<const M: usize>(_a: &[u8; M]) -> [u8; M + 1]
|
|
|
|
where
|
|
|
|
[(); M + 1]:,
|
|
|
|
{
|
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Catter<const A: &'static [u8]>;
|
|
|
|
impl<const A: &'static [u8]> Catter<A>
|
|
|
|
where
|
|
|
|
[(); A.len() + 1]:,
|
|
|
|
{
|
|
|
|
const ZEROS: &'static [u8; A.len()] = &[0_u8; A.len()];
|
|
|
|
const R: &'static [u8] = &catone(Self::ZEROS);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|