summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-25679.rs
blob: b548da98888872d22c33fdd559d3d47d1c9f0df3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-pass
trait Device {
    type Resources;
}
#[allow(unused_tuple_struct_fields)]
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();
}