| error: lifetime may not live long enough | |
| --> $DIR/return-value-lifetime-error.rs:13:47 | |
| | | |
| LL | let _ = counts.iter().max_by_key(|(_, v)| v); | |
| | ------- ^ returning this value requires that `'1` must outlive `'2` | |
| | | | | |
| | | return type of closure is &'2 &i32 | |
| | has type `&'1 (&i32, &i32)` | |
| | | |
| help: dereference the return value | |
| | | |
| LL | let _ = counts.iter().max_by_key(|(_, v)| **v); | |
| | ++ | |
| error: aborting due to 1 previous error | |