fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0631]: type mismatch in closure arguments 2 --> $DIR/late-bound-in-borrow-closure-sugg.rs:26:24 3 | 4LL | let closure = |trader : Trader| { 5 | ----------------- found signature defined here 6... 7LL | trader.set_closure(closure); 8 | ----------- ^^^^^^^ expected due to this 9 | | 10 | required by a bound introduced by this call 11 | 12 = note: expected closure signature `for<'a, 'b> fn(&'a mut Trader<'b>) -> _` 13 found closure signature `for<'a> fn(Trader<'a>) -> _` 14note: required by a bound in `Trader::<'a>::set_closure` 15 --> $DIR/late-bound-in-borrow-closure-sugg.rs:15:50 16 | 17LL | pub fn set_closure(&mut self, function: impl Fn(&mut Trader) + 'a) { 18 | ^^^^^^^^^^^^^^^ required by this bound in `Trader::<'a>::set_closure` 19help: consider adjusting the signature so it borrows its argument 20 | 21LL | let closure = |trader : &mut Trader| { 22 | ++++ 23 24error: aborting due to previous error 25 26For more information about this error, try `rustc --explain E0631`.