]>
Commit | Line | Data |
---|---|---|
923072b8 FG |
1 | warning: function cannot return without recursing |
2 | --> $DIR/hrtb-perfect-forwarding.rs:16:1 | |
3 | | | |
4 | LL | / fn no_hrtb<'b, T>(mut t: T) | |
5 | LL | | where | |
6 | LL | | T: Bar<&'b isize>, | |
064997fb FG |
7 | | |______________________^ cannot return without recursing |
8 | ... | |
9 | LL | no_hrtb(&mut t); | |
10 | | --------------- recursive call site | |
923072b8 | 11 | | |
923072b8 | 12 | = help: a `loop` may express intention better if this is on purpose |
2b03887a | 13 | = note: `#[warn(unconditional_recursion)]` on by default |
923072b8 FG |
14 | |
15 | warning: function cannot return without recursing | |
16 | --> $DIR/hrtb-perfect-forwarding.rs:25:1 | |
17 | | | |
18 | LL | / fn bar_hrtb<T>(mut t: T) | |
19 | LL | | where | |
20 | LL | | T: for<'b> Bar<&'b isize>, | |
064997fb FG |
21 | | |______________________________^ cannot return without recursing |
22 | ... | |
23 | LL | bar_hrtb(&mut t); | |
24 | | ---------------- recursive call site | |
923072b8 FG |
25 | | |
26 | = help: a `loop` may express intention better if this is on purpose | |
27 | ||
28 | warning: function cannot return without recursing | |
29 | --> $DIR/hrtb-perfect-forwarding.rs:35:1 | |
30 | | | |
31 | LL | / fn foo_hrtb_bar_not<'b, T>(mut t: T) | |
32 | LL | | where | |
33 | LL | | T: for<'a> Foo<&'a isize> + Bar<&'b isize>, | |
064997fb FG |
34 | | |_______________________________________________^ cannot return without recursing |
35 | ... | |
36 | LL | foo_hrtb_bar_not(&mut t); | |
37 | | ------------------------ recursive call site | |
923072b8 FG |
38 | | |
39 | = help: a `loop` may express intention better if this is on purpose | |
40 | ||
41 | error: lifetime may not live long enough | |
6a06907d | 42 | --> $DIR/hrtb-perfect-forwarding.rs:43:5 |
b7449926 | 43 | | |
923072b8 FG |
44 | LL | fn foo_hrtb_bar_not<'b, T>(mut t: T) |
45 | | -- lifetime `'b` defined here | |
46 | ... | |
532ac7d7 | 47 | LL | foo_hrtb_bar_not(&mut t); |
923072b8 | 48 | | ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static` |
f2b60f7d FG |
49 | | |
50 | note: due to current limitations in the borrow checker, this implies a `'static` lifetime | |
51 | --> $DIR/hrtb-perfect-forwarding.rs:37:8 | |
52 | | | |
53 | LL | T: for<'a> Foo<&'a isize> + Bar<&'b isize>, | |
54 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
b7449926 | 55 | |
6a06907d XL |
56 | error: implementation of `Bar` is not general enough |
57 | --> $DIR/hrtb-perfect-forwarding.rs:43:5 | |
dfeec247 XL |
58 | | |
59 | LL | foo_hrtb_bar_not(&mut t); | |
923072b8 | 60 | | ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough |
5869c6ff | 61 | | |
6a06907d | 62 | = note: `T` must implement `Bar<&'0 isize>`, for any lifetime `'0`... |
923072b8 FG |
63 | = note: ...but it actually implements `Bar<&'1 isize>`, for some specific lifetime `'1` |
64 | ||
65 | warning: function cannot return without recursing | |
66 | --> $DIR/hrtb-perfect-forwarding.rs:48:1 | |
67 | | | |
68 | LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T) | |
69 | LL | | where | |
70 | LL | | T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>, | |
064997fb FG |
71 | | |_______________________________________________________^ cannot return without recursing |
72 | ... | |
73 | LL | foo_hrtb_bar_hrtb(&mut t); | |
74 | | ------------------------- recursive call site | |
923072b8 FG |
75 | | |
76 | = help: a `loop` may express intention better if this is on purpose | |
dfeec247 | 77 | |
923072b8 | 78 | error: aborting due to 2 previous errors; 4 warnings emitted |
b7449926 | 79 |