rust/src/test/incremental/issue-54242.rs
Matthew Jasper 582ccec1c5 Remove predicates on associated types from traits
These need to only be bounds to avoid cycle errors in trait checking.
2020-10-06 11:19:31 +01:00

21 lines
298 B
Rust

// revisions: rpass cfail
trait Tr
where
(Self::Arr,): Sized,
{
type Arr;
const C: usize = 0;
}
impl Tr for str {
#[cfg(rpass)]
type Arr = [u8; 8];
#[cfg(cfail)]
type Arr = [u8; Self::C];
//[cfail]~^ ERROR cycle detected when simplifying constant
}
fn main() {}