summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/upcast-right-substs.rs
blob: c19c82acf24ffd690b2cd9b23ccc8d29f2a7af49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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;
}