-
Notifications
You must be signed in to change notification settings - Fork 924
cargo fmt
does not do anything in tokio repo
#4078
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
I can't really speak to the tokio nor cargo aspects, so you'd have to check in those respective repos for more details.
If, for whatever reason, the cargo metadata cannot be determined within the tokio workspace then that would be problematic for You could try running |
This comment has been minimized.
This comment has been minimized.
That is by design. |
Outside of the linked issue, tokio uses macros to define modules, which rustfmt cannot recognize (https://github.com/tokio-rs/tokio/blob/67c4cc03919a58076c139f0930f28c3c41dad1e5/tokio/src/lib.rs#L326-L348). I don't think that just adding support for modules defined inside macro calls fixes the issue in tokio crate, though we should add it anyway. |
Somewhat related to #4034 since it's another case where we don't perform module resolution because of macros. |
I found this problem locally and wondered how tokio was checking formatting in CI.
As you can see they are calling
rustfmt
directly:https://github.com/tokio-rs/tokio/blob/master/ci/azure-rustfmt.yml#L17
This comment links to a cargo issue:
rust-lang/cargo#7732
However, this cargo issue is closed and it's not clear how it's related.
The text was updated successfully, but these errors were encountered: