4c2d6de70e
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
13 lines
210 B
Rust
13 lines
210 B
Rust
// compile-flags: -Ztrait-solver=next
|
|
// check-pass
|
|
|
|
trait Foo: Bar<i32> + Bar<u32> {}
|
|
|
|
trait Bar<T> {}
|
|
|
|
fn main() {
|
|
let x: &dyn Foo = todo!();
|
|
let y: &dyn Bar<i32> = x;
|
|
let z: &dyn Bar<u32> = x;
|
|
}
|