]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hrtb/hrtb-perfect-forwarding.polonius.stderr
Auto merge of #84589 - In-line:zircon-thread-name, r=JohnTitor
[rust.git] / src / test / ui / hrtb / hrtb-perfect-forwarding.polonius.stderr
1 warning: function cannot return without recursing
2   --> $DIR/hrtb-perfect-forwarding.rs:22:1
3    |
4 LL | / fn no_hrtb<'b,T>(mut t: T)
5 LL | |     where T : Bar<&'b isize>
6 LL | | {
7 LL | |     // OK -- `T : Bar<&'b isize>`, and thus the impl above ensures that
8 LL | |     // `&mut T : Bar<&'b isize>`.
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:30:1
19    |
20 LL | / fn bar_hrtb<T>(mut t: T)
21 LL | |     where T : for<'b> Bar<&'b isize>
22 LL | | {
23 LL | |     // OK -- `T : for<'b> Bar<&'b isize>`, and thus the impl above
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 T : for<'a> Foo<&'a isize> + Bar<&'b isize>
37 LL | | {
38 LL | |     // Not OK -- The forwarding impl for `Foo` requires that `Bar` also
39 ...  |
40 LL | |     foo_hrtb_bar_not(&mut t);
41    | |     ------------------------ recursive call site
42 LL | |
43 LL | | }
44    | |_^ cannot return without recursing
45    |
46    = help: a `loop` may express intention better if this is on purpose
47
48 error: higher-ranked subtype error
49   --> $DIR/hrtb-perfect-forwarding.rs:46:5
50    |
51 LL |     foo_hrtb_bar_not(&mut t);
52    |     ^^^^^^^^^^^^^^^^^^^^^^^^
53
54 warning: function cannot return without recursing
55   --> $DIR/hrtb-perfect-forwarding.rs:50:1
56    |
57 LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
58 LL | |     where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>
59 LL | | {
60 LL | |     // OK -- now we have `T : for<'b> Bar&'b isize>`.
61 LL | |     foo_hrtb_bar_hrtb(&mut t);
62    | |     ------------------------- recursive call site
63 LL | | }
64    | |_^ cannot return without recursing
65    |
66    = help: a `loop` may express intention better if this is on purpose
67
68 error: aborting due to previous error
69