2019-02-12 02:10:02 +01:00
|
|
|
// revisions: rpass cfail
|
|
|
|
|
2020-07-04 12:15:04 +01:00
|
|
|
trait Tr
|
|
|
|
where
|
|
|
|
(Self::Arr,): Sized,
|
|
|
|
{
|
2019-02-12 02:10:02 +01:00
|
|
|
type Arr;
|
|
|
|
|
|
|
|
const C: usize = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Tr for str {
|
|
|
|
#[cfg(rpass)]
|
|
|
|
type Arr = [u8; 8];
|
|
|
|
#[cfg(cfail)]
|
|
|
|
type Arr = [u8; Self::C];
|
2022-06-02 19:42:29 +02:00
|
|
|
//[cfail]~^ ERROR cycle detected when evaluating type-level constant
|
2019-02-12 02:10:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|