2020-01-03 18:42:02 -06:00
|
|
|
trait Baz {
|
|
|
|
type Quaks;
|
|
|
|
}
|
|
|
|
impl Baz for u8 {
|
|
|
|
type Quaks = [u16; 3];
|
|
|
|
}
|
|
|
|
|
|
|
|
trait Bar {}
|
|
|
|
impl Bar for [u16; 4] {}
|
|
|
|
impl Bar for [[u16; 3]; 3] {}
|
|
|
|
|
2021-11-13 16:56:22 -06:00
|
|
|
trait Foo
|
|
|
|
where
|
|
|
|
[<u8 as Baz>::Quaks; 2]: Bar, //~ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
|
|
|
|
<u8 as Baz>::Quaks: Bar, //~ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
|
2020-01-03 18:42:02 -06:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
struct FooImpl;
|
|
|
|
|
|
|
|
impl Foo for FooImpl {}
|
2020-01-03 23:54:19 -06:00
|
|
|
//~^ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
|
|
|
|
//~^^ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
|
2020-01-03 18:42:02 -06:00
|
|
|
|
|
|
|
fn f(_: impl Foo) {}
|
2020-01-03 23:54:19 -06:00
|
|
|
//~^ ERROR the trait bound `[u16; 3]: Bar` is not satisfied [E0277]
|
|
|
|
//~^^ ERROR the trait bound `[[u16; 3]; 2]: Bar` is not satisfied [E0277]
|
2020-01-03 18:42:02 -06:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
f(FooImpl)
|
|
|
|
}
|