11warning: function cannot return without recursing
2- --> $DIR/hrtb-perfect-forwarding.rs:22 :1
2+ --> $DIR/hrtb-perfect-forwarding.rs:16 :1
33 |
4- LL | / fn no_hrtb<'b,T>(mut t: T)
5- LL | | where T : Bar<&'b isize>
4+ LL | / fn no_hrtb<'b, T>(mut t: T)
5+ LL | | where
6+ LL | | T: Bar<&'b isize>,
67LL | | {
7- LL | | // OK -- `T : Bar<&'b isize>`, and thus the impl above ensures that
8- LL | | // `&mut T : Bar<&'b isize>`.
8+ ... |
99LL | | no_hrtb(&mut t);
1010 | | --------------- recursive call site
1111LL | | }
@@ -15,12 +15,12 @@ LL | | }
1515 = help: a `loop` may express intention better if this is on purpose
1616
1717warning: function cannot return without recursing
18- --> $DIR/hrtb-perfect-forwarding.rs:30 :1
18+ --> $DIR/hrtb-perfect-forwarding.rs:25 :1
1919 |
2020LL | / fn bar_hrtb<T>(mut t: T)
21- LL | | where T : for<'b> Bar<&'b isize>
21+ LL | | where
22+ LL | | T: for<'b> Bar<&'b isize>,
2223LL | | {
23- LL | | // OK -- `T : for<'b> Bar<&'b isize>`, and thus the impl above
2424... |
2525LL | | bar_hrtb(&mut t);
2626 | | ---------------- recursive call site
@@ -30,40 +30,42 @@ LL | | }
3030 = help: a `loop` may express intention better if this is on purpose
3131
3232warning: function cannot return without recursing
33- --> $DIR/hrtb-perfect-forwarding.rs:39 :1
33+ --> $DIR/hrtb-perfect-forwarding.rs:35 :1
3434 |
35- LL | / fn foo_hrtb_bar_not<'b,T>(mut t: T)
36- LL | | where T : for<'a> Foo<&'a isize> + Bar<&'b isize>
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>,
3738LL | | {
38- LL | | // Not OK -- The forwarding impl for `Foo` requires that `Bar` also
3939... |
4040LL | | foo_hrtb_bar_not(&mut t);
4141 | | ------------------------ recursive call site
4242LL | |
43+ LL | |
4344LL | | }
4445 | |_^ cannot return without recursing
4546 |
4647 = help: a `loop` may express intention better if this is on purpose
4748
4849error: higher-ranked subtype error
49- --> $DIR/hrtb-perfect-forwarding.rs:46 :5
50+ --> $DIR/hrtb-perfect-forwarding.rs:43 :5
5051 |
5152LL | foo_hrtb_bar_not(&mut t);
5253 | ^^^^^^^^^^^^^^^^^^^^^^^^
5354
5455warning: function cannot return without recursing
55- --> $DIR/hrtb-perfect-forwarding.rs:50 :1
56+ --> $DIR/hrtb-perfect-forwarding.rs:48 :1
5657 |
5758LL | / 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 | | where
60+ LL | | T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>,
5961LL | | {
60- LL | | // OK -- now we have `T : for<'b> Bar&'b isize>`.
62+ LL | | // OK -- now we have `T : for<'b> Bar< &'b isize>`.
6163LL | | foo_hrtb_bar_hrtb(&mut t);
6264 | | ------------------------- recursive call site
6365LL | | }
6466 | |_^ cannot return without recursing
6567 |
6668 = help: a `loop` may express intention better if this is on purpose
6769
68- error: aborting due to previous error
70+ error: aborting due to previous error; 4 warnings emitted
6971
0 commit comments