4c2d6de70e
Aka trait_upcasting feature. And also adjust the `deref_into_dyn_supertrait` lint.
12 lines
200 B
Rust
12 lines
200 B
Rust
// compile-flags: -Ztrait-solver=next
|
|
|
|
trait Foo: Bar<i32> + Bar<u32> {}
|
|
|
|
trait Bar<T> {}
|
|
|
|
fn main() {
|
|
let x: &dyn Foo = todo!();
|
|
let y: &dyn Bar<usize> = x;
|
|
//~^ ERROR mismatched types
|
|
}
|