diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-25679.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-25679.rs b/src/test/ui/issues/issue-25679.rs new file mode 100644 index 000000000..b548da988 --- /dev/null +++ b/src/test/ui/issues/issue-25679.rs @@ -0,0 +1,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(); +} |