rust/tests/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
267 B
Rust
Raw Normal View History

2020-03-03 10:25:03 -06:00
// run-pass
2023-01-02 17:18:00 -06:00
// compile-flags: -Z trait-solver=chalk
2020-03-03 10:25:03 -06:00
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>()
}