summaryrefslogtreecommitdiffstats
path: root/tests/ui/closures/supertrait-hint-references-assoc-ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/closures/supertrait-hint-references-assoc-ty.rs')
-rw-r--r--tests/ui/closures/supertrait-hint-references-assoc-ty.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/closures/supertrait-hint-references-assoc-ty.rs b/tests/ui/closures/supertrait-hint-references-assoc-ty.rs
new file mode 100644
index 000000000..270bf14c3
--- /dev/null
+++ b/tests/ui/closures/supertrait-hint-references-assoc-ty.rs
@@ -0,0 +1,17 @@
+// check-pass
+
+pub trait Fn0: Fn(i32) -> Self::Out {
+ type Out;
+}
+
+impl<F: Fn(i32) -> ()> Fn0 for F {
+ type Out = ();
+}
+
+pub fn closure_typer(_: impl Fn0) {}
+
+fn main() {
+ closure_typer(move |x| {
+ let _: i64 = x.into();
+ });
+}