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
Recently all of my files that are behind config flags stopped formatting with cargo fmt, even if the code would be configured into a current build (eg: a cfg(windows) module on a windows machine).
The text was updated successfully, but these errors were encountered:
Lokathor
changed the title
rustfmt seems to have stopped format files behind configurations?
rustfmt seems to have stopped formatting files behind configurations?
Jan 30, 2020
@Lokathor Thank you for sharing the problematic repository. It looks like the crate is using pick! macro, which rustfmt does not support yet:
pick!{if #[cfg(windows)]{mod windows;use windows as sys;typeSysTerm = sys::WindowsTerminal;} else if #[cfg(unix)]{mod unix;use unix as sys;typeSysTerm = sys::UnixTerminal;} else {
compile_error!("This crate doesn't support this system.");}}
Currently, rustfmt is only able to resolve modules that are declared inside macros.
rustfmt 1.4.11-nightly (18382352 2019-12-03)
Recently all of my files that are behind config flags stopped formatting with
cargo fmt
, even if the code would be configured into a current build (eg: acfg(windows)
module on a windows machine).The text was updated successfully, but these errors were encountered: