summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/issue-102705.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lint/issue-102705.rs')
-rw-r--r--src/test/ui/lint/issue-102705.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/lint/issue-102705.rs b/src/test/ui/lint/issue-102705.rs
new file mode 100644
index 000000000..5bcc8950a
--- /dev/null
+++ b/src/test/ui/lint/issue-102705.rs
@@ -0,0 +1,22 @@
+// check-pass
+
+#![allow(opaque_hidden_inferred_bound)]
+#![allow(dead_code)]
+
+trait Duh {}
+
+impl Duh for i32 {}
+
+trait Trait {
+ type Assoc: Duh;
+}
+
+impl<R: Duh, F: FnMut() -> R> Trait for F {
+ type Assoc = R;
+}
+
+fn foo() -> impl Trait<Assoc = impl Send> {
+ || 42
+}
+
+fn main() {}