1
1
note: no external requirements
2
2
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:21:15
3
3
|
4
- LL | foo(cell, |cell_a, cell_x| {
5
- | _______________^
6
- LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
7
- LL | |
8
- LL | | })
9
- | |_____^
4
+ LL | foo(cell, |cell_a, cell_x| {
5
+ | ^^^^^^^^^^^^^^^^
10
6
|
11
7
= note: defining type: case1::{closure#0} with closure substs [
12
8
i32,
@@ -27,25 +23,16 @@ LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
27
23
note: no external requirements
28
24
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:18:1
29
25
|
30
- LL | / fn case1() {
31
- LL | | let a = 0;
32
- LL | | let cell = Cell::new(&a);
33
- LL | | foo(cell, |cell_a, cell_x| {
34
- ... |
35
- LL | | })
36
- LL | | }
37
- | |_^
26
+ LL | fn case1() {
27
+ | ^^^^^^^^^^
38
28
|
39
29
= note: defining type: case1
40
30
41
31
note: external requirements
42
32
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:35:15
43
33
|
44
- LL | foo(cell, |cell_a, cell_x| {
45
- | _______________^
46
- LL | | cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error
47
- LL | | })
48
- | |_____^
34
+ LL | foo(cell, |cell_a, cell_x| {
35
+ | ^^^^^^^^^^^^^^^^
49
36
|
50
37
= note: defining type: case2::{closure#0} with closure substs [
51
38
i32,
@@ -58,14 +45,8 @@ LL | | })
58
45
note: no external requirements
59
46
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
60
47
|
61
- LL | / fn case2() {
62
- LL | | let a = 0;
63
- LL | | let cell = Cell::new(&a);
64
- LL | |
65
- ... |
66
- LL | | })
67
- LL | | }
68
- | |_^
48
+ LL | fn case2() {
49
+ | ^^^^^^^^^^
69
50
|
70
51
= note: defining type: case2
71
52
0 commit comments