rust/tests/ui/traits/new-solver/equating-projection-cyclically.rs
2023-03-11 23:16:46 +00:00

25 lines
332 B
Rust

// compile-flags: -Ztrait-solver=next
// known-bug: unknown
trait Test {
type Assoc;
}
fn transform<T: Test>(x: T) -> T::Assoc {
todo!()
}
impl Test for i32 {
type Assoc = i32;
}
impl Test for String {
type Assoc = String;
}
fn main() {
let mut x = Default::default();
x = transform(x);
x = 1i32;
}