rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P)
0.3.2045-standalone (4afe0d539 2024-07-21)
editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable)
VSCode
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)
repository link (if public, optional): (eg. rust-analyzer)
use std::io::{stdout, Write};
fn main() {
write!(stdout(), "Hello, world!\n").unwrap();
}
Trigger this again results in this odd output:
use std::ain() { write!(stdout(), "Hello, world!\n").unwrap();
}
The above is a minimal repro, but I trigger this bug fairly regularly in normal use when attempting to clean up imports. It's a broken window / paper cut problem.
rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via Ctrl/⌘+Shift+P) 0.3.2045-standalone (4afe0d539 2024-07-21)
rustc version: (eg. output of
rustc -V
) rustc 1.80.0 (051478957 2024-07-21)editor or extension: (eg. VSCode, Vim, Emacs, etc. For VSCode users, specify your extension version; for users of other editors, provide the distribution if applicable) VSCode
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
)repository link (if public, optional): (eg. rust-analyzer)
code snippet to reproduce:
Trigger remove unused import on the alloc line:
Trigger this again results in this odd output:
The above is a minimal repro, but I trigger this bug fairly regularly in normal use when attempting to clean up imports. It's a broken window / paper cut problem.