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