mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
19 lines
267 B
Rust
19 lines
267 B
Rust
// 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>()
|
|
}
|