-
Notifications
You must be signed in to change notification settings - Fork 925
cargo fmt only works in root directory of project #3647
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 suspect this has some relation to the workspace issues and the I'd be happy to work on this one @topecongiro |
@calebcartwright Great! IIRC |
That was fast. Thanks! |
This is happening to me in 1.4.14. It was happening in 1.4.13 as well, as I just updated to try to see if that fixed the issue. Is it possible there was a regression? |
sorry for commenting on the closed issue, but seems this is happening again?
my setup:
I want to run the
but
error, i have to do |
@lnshi - couple things to note It's alright (in some cases) to post to a closed issue, but you don't need to tag maintainers on issues as GitHub already handles notifications. That's especially true for folks you've been tagging recently in various issues, like Nick and Seiichi, as they haven't been involved with the project for quite some time. It looks like your post is in reference to a manifest path target that is a workspace, which is a different use case than the issue reported here, despite the similarity in symptoms. I suspect your report is a duplicate of #4432 |
I often leave my shell in the
project/src
directory so I don't have to prependsrc
every time I open a file. Other cargo commands such ascargo run
andcargo check
work fine in thesrc
directory, butcargo fmt
does not:cargo fmt
would more closely resemble other cargo subcommands (and git subcommands, to name another tool with this behavior) if it recursed upwards to find theCargo.toml
first.I'm using a recent nightly version of rustc, cargo, & rustfmt:
The text was updated successfully, but these errors were encountered: