fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1warning: function cannot return without recursing 2 --> $DIR/region-bound-on-closure-outlives-call.rs:1:1 3 | 4LL | fn call_rec<F>(mut f: F) -> usize where F: FnMut(usize) -> usize { 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 6LL | 7LL | (|x| f(x))(call_rec(f)) 8 | ----------- recursive call site 9 | 10 = note: `#[warn(unconditional_recursion)]` on by default 11 = help: a `loop` may express intention better if this is on purpose 12 13error[E0505]: cannot move out of `f` because it is borrowed 14 --> $DIR/region-bound-on-closure-outlives-call.rs:3:25 15 | 16LL | (|x| f(x))(call_rec(f)) 17 | --- - ^ move out of `f` occurs here 18 | | | 19 | | borrow occurs due to use in closure 20 | borrow of `f` occurs here 21 22error: aborting due to previous error 23 24For more information about this error, try `rustc --explain E0505`.