We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
impl Fn
1 parent 86b2819 commit 3ed486bCopy full SHA for 3ed486b
src/test/ui/impl-trait/impl_fn_associativity.rs
@@ -0,0 +1,16 @@
1
+// run-pass
2
+use std::fmt::Debug;
3
+
4
+fn f_debug() -> impl Fn() -> impl Debug {
5
+ || ()
6
+}
7
8
+fn ff_debug() -> impl Fn() -> impl Fn() -> impl Debug {
9
+ || f_debug()
10
11
12
+fn main() {
13
+ // Check that `ff_debug` is `() -> (() -> Debug)` and not `(() -> ()) -> Debug`
14
+ let debug = ff_debug()()();
15
+ assert_eq!(format!("{:?}", debug), "()");
16
0 commit comments