]> git.lizzy.rs Git - rust.git/blob - tests/ui/higher-rank-trait-bounds/hrtb-perfect-forwarding.stderr
Rollup merge of #107201 - compiler-errors:confusing-async-fn-note, r=estebank
[rust.git] / tests / ui / higher-rank-trait-bounds / hrtb-perfect-forwarding.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    | |______________________^ cannot return without recursing
8 ...
9 LL |       no_hrtb(&mut t);
10    |       --------------- recursive call site
11    |
12    = help: a `loop` may express intention better if this is on purpose
13    = note: `#[warn(unconditional_recursion)]` on by default
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>,
21    | |______________________________^ cannot return without recursing
22 ...
23 LL |       bar_hrtb(&mut t);
24    |       ---------------- recursive call site
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>,
34    | |_______________________________________________^ cannot return without recursing
35 ...
36 LL |       foo_hrtb_bar_not(&mut t);
37    |       ------------------------ recursive call site
38    |
39    = help: a `loop` may express intention better if this is on purpose
40
41 error: lifetime may not live long enough
42   --> $DIR/hrtb-perfect-forwarding.rs:43:5
43    |
44 LL | fn foo_hrtb_bar_not<'b, T>(mut t: T)
45    |                     -- lifetime `'b` defined here
46 ...
47 LL |     foo_hrtb_bar_not(&mut t);
48    |     ^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'b` must outlive `'static`
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    |        ^^^^^^^^^^^^^^^^^^^^^^
55
56 error: implementation of `Bar` is not general enough
57   --> $DIR/hrtb-perfect-forwarding.rs:43:5
58    |
59 LL |     foo_hrtb_bar_not(&mut t);
60    |     ^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Bar` is not general enough
61    |
62    = note: `T` must implement `Bar<&'0 isize>`, for any lifetime `'0`...
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>,
71    | |_______________________________________________________^ cannot return without recursing
72 ...
73 LL |       foo_hrtb_bar_hrtb(&mut t);
74    |       ------------------------- recursive call site
75    |
76    = help: a `loop` may express intention better if this is on purpose
77
78 error: aborting due to 2 previous errors; 4 warnings emitted
79