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.
1 parent bba3cab commit 69116b4Copy full SHA for 69116b4
[refs]
@@ -1,5 +1,5 @@
1
---
2
-refs/heads/master: 7f12358656ed3e3d657191bc19d08a4d6a0ef674
+refs/heads/master: daf0d63a59e5abfb32477748e8df4bffe1fbe2e1
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
trunk/src/test/run-pass/closure-inference.rs
@@ -0,0 +1,8 @@
+fn foo(i: int) -> int { i + 1 }
+
+fn apply<A>(f: fn(A) -> A, v: A) -> A { f(v) }
+fn main() {
6
+ let f = {|i| foo(i)};
7
+ assert apply(f, 2) == 3;
8
+}
0 commit comments