mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-17 19:14:16 +00:00
14 lines
230 B
Rust
14 lines
230 B
Rust
// compile-flags: -Ztrait-solver=next
|
|
|
|
#![feature(trait_upcasting)]
|
|
|
|
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
|
|
}
|