summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/upcast-wrong-substs.rs
blob: 0cd253007fc548a97d3ccd1b9c7a4102c3a60dd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
// compile-flags: -Znext-solver

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
}