mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
15 lines
240 B
Rust
15 lines
240 B
Rust
// compile-flags: -Ztrait-solver=next
|
|
// check-pass
|
|
|
|
#![feature(trait_upcasting)]
|
|
|
|
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;
|
|
}
|