REVIS

Features

Visualize lifetime-related Rust compiler errors. This extension focuses on errors with a "timeline" that can be visualized.

Requirements

The extension needs the diagnostics information from rust-analyzer. Install the VSCode extension rust-analyzer and add the following to settings.json:

"rust-analyzer.diagnostics.useRustcErrorCode": true

The configuration can be automatically set when you use the extension for the first time. Just click "Allow" when the warning prompt appears. The configuration will be added to .vscode/settings.json under the project root.

How to use

Right-pointing red triangles will be displayed for supported errors after the source file is saved. To display/hide the visualization, move the text cursor to the line with the red triangle and execute command revis.toggleVisualization or use the keyboard shortcut Ctrl+Shift+V. To clear all visualizations, execute command revis.clearAllVisualizations. To refresh the visualizations, save the current file.

Note

This extension is still in an early stage. Please file an issue or contact Ruochen (wangrc@ucsd.edu) if you find any bugs/confusing points.