-
Notifications
You must be signed in to change notification settings - Fork 926
cargo fmt fails to format code when using symlinks #6555
New issue
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
Comments
It's not entirely clear to me what your exact setup is, nor what behavior you're expecting (are you expecting to be able to run
As such I assume that if you ran |
I've create a repo to share my setup: https://github.com/ckoehne/rustfmt-symlink-bug/tree/master Yes, I'd expect that
As you can see, when specifying
|
When symlinking a file, it looks like cargo fmt isn't able to properly resolve modules. It causes cargo fmt to ignore certain modules referenced by that symlinked file.
Here's a minimal reproducable example:
cargo fmt only formats the
plain
file by default. You have to explicitly passlinked/src/unformatted.rs
to cargo fmt to format it.The rust code itself is working as expected:
The text was updated successfully, but these errors were encountered: