- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Closed
Labels
Description
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:
    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.
Related to (but distinct from): #11373