You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){#[cfg(target_os = "linux")]let x = 42else{todo!()};// #[cfg(target_os = "linux")]let x = 42else{todo!()};}
With some attribute on a let-else statement, rustfmt always inserts newline before else. When removing the attribute, this doesn't happen and rustfmt works as intended.
Expected behavior
My expectation is that rustfmt does not change formatting looking at the existence of attribute:
fnmain(){#[cfg(target_os = "linux")]let x = 42else{todo!()};// #[cfg(target_os = "linux")]let x = 42else{todo!()};}