rust/tests/ui/traits/next-solver/upcast-right-substs.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
233 B
Rust
Raw Normal View History

2023-12-14 13:11:28 +01:00
// compile-flags: -Znext-solver
2023-01-23 23:56:54 +00:00
// check-pass
#![feature(trait_upcasting)]
2023-01-23 23:56:54 +00:00
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;
}