fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: function cannot return without recursing 2 --> $DIR/hrtb-perfect-forwarding.rs:16:1 3 | 4LL | / fn no_hrtb<'b, T>(mut t: T) 5LL | | where 6LL | | T: Bar<&'b isize>, 7LL | | { 8... | 9LL | | no_hrtb(&mut t); 10 | | --------------- recursive call site 11LL | | } 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 17warning: function cannot return without recursing 18 --> $DIR/hrtb-perfect-forwarding.rs:25:1 19 | 20LL | / fn bar_hrtb<T>(mut t: T) 21LL | | where 22LL | | T: for<'b> Bar<&'b isize>, 23LL | | { 24... | 25LL | | bar_hrtb(&mut t); 26 | | ---------------- recursive call site 27LL | | } 28 | |_^ cannot return without recursing 29 | 30 = help: a `loop` may express intention better if this is on purpose 31 32warning: function cannot return without recursing 33 --> $DIR/hrtb-perfect-forwarding.rs:35:1 34 | 35LL | / fn foo_hrtb_bar_not<'b, T>(mut t: T) 36LL | | where 37LL | | T: for<'a> Foo<&'a isize> + Bar<&'b isize>, 38LL | | { 39... | 40LL | | foo_hrtb_bar_not(&mut t); 41 | | ------------------------ recursive call site 42LL | | 43LL | | 44LL | | } 45 | |_^ cannot return without recursing 46 | 47 = help: a `loop` may express intention better if this is on purpose 48 49error: higher-ranked subtype error 50 --> $DIR/hrtb-perfect-forwarding.rs:43:5 51 | 52LL | foo_hrtb_bar_not(&mut t); 53 | ^^^^^^^^^^^^^^^^^^^^^^^^ 54 55warning: function cannot return without recursing 56 --> $DIR/hrtb-perfect-forwarding.rs:48:1 57 | 58LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T) 59LL | | where 60LL | | T: for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>, 61LL | | { 62LL | | // OK -- now we have `T : for<'b> Bar<&'b isize>`. 63LL | | foo_hrtb_bar_hrtb(&mut t); 64 | | ------------------------- recursive call site 65LL | | } 66 | |_^ cannot return without recursing 67 | 68 = help: a `loop` may express intention better if this is on purpose 69 70error: aborting due to previous error; 4 warnings emitted 71