rust/src/test/ui/chalkify/trait_implied_bound.rs

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

19 lines
254 B
Rust
Raw Normal View History

2020-03-03 11:25:03 -05:00
// run-pass
// compile-flags: -Z 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>()
}