summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-26127.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-26127.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-26127.rs b/src/test/ui/issues/issue-26127.rs
new file mode 100644
index 000000000..f3f9c1d9a
--- /dev/null
+++ b/src/test/ui/issues/issue-26127.rs
@@ -0,0 +1,12 @@
+// run-pass
+trait Tr { type T; }
+impl Tr for u8 { type T=(); }
+struct S<I: Tr>(#[allow(unused_tuple_struct_fields)] I::T);
+
+fn foo<I: Tr>(i: I::T) {
+ S::<I>(i);
+}
+
+fn main() {
+ foo::<u8>(());
+}