rust-analyzer version: rust-analyzer version: 0.3.2319-standalone [/home/lennart/.vscode/extensions/rust-lang.rust-analyzer-0.3.2319-linux-x64/server/rust-analyzer]
rustc version: rustc 1.82.0 (f6e511eec 2024-10-15)
editor or extension: VSCode v0.3.2319
relevant settings: Base settings
repository link (if public, optional): https://github.com/pc2/sus-compiler
code snippet to reproduce:
Using the code action "Inline early_return" also inlines the return None statement unmodified, which does not match the original function's behavior
fn early_return() -> Option<()> {
return None;
}
fn use_early_return() -> Option<()> {
if early_return().is_none() {
return Some(());
}
None
}
produces
fn use_early_return() -> Option<()> {
if {
return None;
}.is_none() {
return Some(());
}
None
}
rust-analyzer version: rust-analyzer version: 0.3.2319-standalone [/home/lennart/.vscode/extensions/rust-lang.rust-analyzer-0.3.2319-linux-x64/server/rust-analyzer]
rustc version: rustc 1.82.0 (f6e511eec 2024-10-15)
editor or extension: VSCode v0.3.2319
relevant settings: Base settings
repository link (if public, optional): https://github.com/pc2/sus-compiler
code snippet to reproduce:
Using the code action "Inline
early_return" also inlines thereturn Nonestatement unmodified, which does not match the original function's behaviorproduces