]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/hrtb-perfect-forwarding.polonius.stderr
Tweak use of trimmed paths
[rust.git] / tests / ui / higher-rank-trait-bounds / hrtb-perfect-forwarding.polonius.stderr
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>,
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:25: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:35: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 LL | |
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: higher-ranked subtype error
50   --> $DIR/hrtb-perfect-forwarding.rs:43:5
51    |
52 LL |     foo_hrtb_bar_not(&mut t);
53    |     ^^^^^^^^^^^^^^^^^^^^^^^^
54
55 warning: function cannot return without recursing
56   --> $DIR/hrtb-perfect-forwarding.rs:48:1
57    |
58 LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
59 LL | | where
60 LL | |     T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>,
61 LL | | {
62 LL | |     // OK -- now we have `T : for<'b> Bar<&'b isize>`.
63 LL | |     foo_hrtb_bar_hrtb(&mut t);
64    | |     ------------------------- recursive call site
65 LL | | }
66    | |_^ cannot return without recursing
67    |
68    = help: a `loop` may express intention better if this is on purpose
69
70 error: aborting due to previous error; 4 warnings emitted
71