summaryrefslogtreecommitdiffstats
path: root/tests/ui/chalkify/trait_implied_bound.rs
blob: f97dbf6b7e7748649213c7b7144fcce67495c8e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// run-pass
// compile-flags: -Z trait-solver=chalk

trait Foo { }
trait Bar<U> where U: Foo { }

impl Foo for i32 { }
impl Bar<i32> for i32 { }

fn only_foo<T: Foo>() { }

fn only_bar<U, T: Bar<U>>() {
    only_foo::<U>()
}

fn main() {
    only_bar::<i32, i32>()
}