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
Thanks for the report @heftig and the repro case! Believe I know what the issue is so I'll take a look later today after work.
I still suspect we could handle our mod/file resolution process a bit more simply, but can never seem to find the time for investigating a more holistic refactor. Will make sure the fix for this gets pulled into the next sync though
Problem
cargo fmt
does not processes modules that are referenced in an inline mod in a non-inline mod.This is slightly more complex case than #4874, so it seems that bug was not fully fixed.
Steps
crate tree:
src/main.rs
:src/foo.rs
:src/foo/bar/baz.rs
: empty1.52.0 is fine:
1.53.0, stable and nightly are broken:
Notes
Output of
rustfmt --version
:rustfmt 1.4.36-stable (7de6968 2021-02-07)
rustfmt 1.4.37-stable (2a3635d 2021-05-04)
rustfmt 1.4.37-stable (59eed8a 2021-11-01)
rustfmt 1.4.38-nightly (baba668 2021-11-03)
Rust via rustup 1.24.3, Arch Linux.
The text was updated successfully, but these errors were encountered: