2019-02-11 19:10:02 -06:00
|
|
|
// revisions: rpass cfail
|
|
|
|
|
2020-07-04 06:15:04 -05:00
|
|
|
trait Tr
|
|
|
|
where
|
|
|
|
(Self::Arr,): Sized,
|
|
|
|
{
|
2019-02-11 19:10:02 -06: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 12:42:29 -05:00
|
|
|
//[cfail]~^ ERROR cycle detected when evaluating type-level constant
|
2019-02-11 19:10:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|