Variable lifetime visualization for borrow checker errors
RustRover can visualize variable lifetimes in case the borrow checker reports an error. This may help you in locating and fixing ownership issues.
note
For this feature to work, make sure on-the-fly linter analysis is turned on: go to Settings | Rust | External Linters and set the Run external linter on the fly checkbox.
Also, the Inline problem explanations setting must be enabled in Settings | Editor | Inlay hints | Other | Rust (it is enabled by default).
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.
Gif
Thanks for your feedback!
Was this page helpful?
Cookie Settings
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.