]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hrtb/hrtb-perfect-forwarding.nll.stderr
Rollup merge of #97317 - GuillaumeGomez:gui-settings-text-click, r=jsha
[rust.git] / src / test / ui / hrtb / hrtb-perfect-forwarding.nll.stderr
1 warning: function cannot return without recursing
2   --> $DIR/hrtb-perfect-forwarding.rs:20:1
3    |
4 LL | / fn no_hrtb<'b, T>(mut t: T)
5 LL | | where
6 LL | |     T: Bar<&'b isize>,
7 LL | | {
8 ...  |
9 LL | |     no_hrtb(&mut t);
10    | |     --------------- recursive call site
11 LL | | }
12    | |_^ cannot return without recursing
13    |
14    = note: `#[warn(unconditional_recursion)]` on by default
15    = help: a `loop` may express intention better if this is on purpose
16
17 warning: function cannot return without recursing
18   --> $DIR/hrtb-perfect-forwarding.rs:29:1
19    |
20 LL | / fn bar_hrtb<T>(mut t: T)
21 LL | | where
22 LL | |     T: for<'b> Bar<&'b isize>,
23 LL | | {
24 ...  |
25 LL | |     bar_hrtb(&mut t);
26    | |     ---------------- recursive call site
27 LL | | }
28    | |_^ cannot return without recursing
29    |
30    = help: a `loop` may express intention better if this is on purpose
31
32 warning: function cannot return without recursing
33   --> $DIR/hrtb-perfect-forwarding.rs:39:1
34    |
35 LL | / fn foo_hrtb_bar_not<'b, T>(mut t: T)
36 LL | | where
37 LL | |     T: for<'a> Foo<&'a isize> + Bar<&'b isize>,
38 LL | | {
39 ...  |
40 LL | |     foo_hrtb_bar_not(&mut t);
41    | |     ------------------------ recursive call site
42 ...  |
43 LL | |
44 LL | | }
45    | |_^ cannot return without recursing
46    |
47    = help: a `loop` may express intention better if this is on purpose
48
49 error: lifetime may not live long enough
50   --> $DIR/hrtb-perfect-forwarding.rs:47:5
51    |
52 LL | fn foo_hrtb_bar_not<'b, T>(mut t: T)
53    |                     -- lifetime `'b` defined here
54 ...
55 LL |     foo_hrtb_bar_not(&mut t);
56    |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
57
58 error: implementation of `Bar` is not general enough
59   --> $DIR/hrtb-perfect-forwarding.rs:47:5
60    |
61 LL |     foo_hrtb_bar_not(&mut t);
62    |     ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough
63    |
64    = note: `T` must implement `Bar<&'0 isize>`, for any lifetime `'0`...
65    = note: ...but it actually implements `Bar<&'1 isize>`, for some specific lifetime `'1`
66
67 warning: function cannot return without recursing
68   --> $DIR/hrtb-perfect-forwarding.rs:53:1
69    |
70 LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
71 LL | | where
72 LL | |     T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>,
73 LL | | {
74 LL | |     // OK -- now we have `T : for<'b> Bar<&'b isize>`.
75 LL | |     foo_hrtb_bar_hrtb(&mut t);
76    | |     ------------------------- recursive call site
77 LL | | }
78    | |_^ cannot return without recursing
79    |
80    = help: a `loop` may express intention better if this is on purpose
81
82 error: aborting due to 2 previous errors; 4 warnings emitted
83