diff options
Diffstat (limited to 'tests/ui/impl-trait/issue-51185.rs')
-rw-r--r-- | tests/ui/impl-trait/issue-51185.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issue-51185.rs b/tests/ui/impl-trait/issue-51185.rs new file mode 100644 index 000000000..52a2b2553 --- /dev/null +++ b/tests/ui/impl-trait/issue-51185.rs @@ -0,0 +1,8 @@ +// run-pass +fn foo() -> impl Into<for<'a> fn(&'a ())> { + (|_| {}) as for<'a> fn(&'a ()) +} + +fn main() { + foo().into()(&()); +} |