Variable lifetime visualization for borrow checker errors

Last modified: 14 March 2025

RustRover can visualize variable lifetimes in case the borrow checker reports an error. This may help you in locating and fixing ownership issues.

Place the caret at the highlighted code or hover over it – the variable lifetime will be marked with a vertical blue line on the left and a pair of comments on the right.

https://resources.jetbrains.com.cn/help/img/idea/2024.3/ri_variables_lifetime_visualization.png
Gif