We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-analyzer version: rust-analyzer-2025.02.24-r0 rustc version: rustc 1.85.0 (4d91de4e4 2025-02-17) (Alpine Linux 1.85.0-r1) editor or extension: neovim-0.10.4-r1 relevant settings: n/a
code snippet to reproduce:
match failed.load(Ordering::Relaxed) { 0 => { info!("Repair complete, no failures."); Ok(()) } some => bail!("A total of {some} operations failed."), }
For the above snippet, the Replace match with if let action produces:
Replace match with if let
if let some = failed.load(Ordering::Relaxed) { bail!("A total of {some} operations failed.") } else { info!("Repair complete, no failures."); Ok(()) }
The latter is not equivalent to the former: the else branch never matches for it.
else
Related to (but distinct from): #11373
The text was updated successfully, but these errors were encountered:
No branches or pull requests
rust-analyzer version: rust-analyzer-2025.02.24-r0
rustc version: rustc 1.85.0 (4d91de4e4 2025-02-17) (Alpine Linux 1.85.0-r1)
editor or extension: neovim-0.10.4-r1
relevant settings: n/a
code snippet to reproduce:
For the above snippet, the
Replace match with if let
action produces:The latter is not equivalent to the former: the
else
branch never matches for it.Related to (but distinct from): #11373
The text was updated successfully, but these errors were encountered: