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 14d633a commit e83f0e0Copy full SHA for e83f0e0
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 2c65e10a9fff0fe5a4fb1fc54081b4b0ca19ac61
+refs/heads/master: 0910a7323ca861e833d5a92a9bcf0f844699ca7c
trunk/src/test/run-pass/generic-temporary.rs
@@ -0,0 +1,21 @@
+
+// xfail-stage0
3
4
+fn mk() -> int {
5
+ ret 1;
6
+}
7
8
+fn chk(&int a) {
9
+ log a;
10
+ check (a == 1);
11
12
13
+fn apply[T](fn() -> T produce, fn(&T) consume) {
14
+ consume(produce());
15
16
17
+fn main() {
18
+ let (fn()->int) produce = mk;
19
+ let (fn(&int)) consume = chk;
20
+ apply[int](produce, consume);
21
0 commit comments