rust/src/test/ui/issues/issue-25679.rs
2019-07-27 18:56:16 +03:00

20 lines
275 B
Rust

// run-pass
trait Device {
type Resources;
}
struct Foo<D, R>(D, R);
impl<D: Device> Foo<D, D::Resources> {
fn present(&self) {}
}
struct Res;
struct Dev;
impl Device for Dev { type Resources = Res; }
fn main() {
let foo = Foo(Dev, Res);
foo.present();
}