mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
30 lines
352 B
Rust
30 lines
352 B
Rust
![]() |
//@ check-pass
|
||
|
|
||
|
trait Baz {
|
||
|
type Quaks;
|
||
|
}
|
||
|
impl Baz for u8 {
|
||
|
type Quaks = [u16; 3];
|
||
|
}
|
||
|
|
||
|
trait Bar {}
|
||
|
impl Bar for [u16; 3] {}
|
||
|
impl Bar for [[u16; 3]; 2] {}
|
||
|
|
||
|
trait Foo
|
||
|
where
|
||
|
[<u8 as Baz>::Quaks; 2]: Bar,
|
||
|
<u8 as Baz>::Quaks: Bar,
|
||
|
{
|
||
|
}
|
||
|
|
||
|
struct FooImpl;
|
||
|
|
||
|
impl Foo for FooImpl {}
|
||
|
|
||
|
fn f(_: impl Foo) {}
|
||
|
|
||
|
fn main() {
|
||
|
f(FooImpl)
|
||
|
}
|