-
Notifications
You must be signed in to change notification settings - Fork 873
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
Unexpected string literal indents #2695
Comments
Thank you for filing an issue! I think that this is already fixed via #2589, but unfortunately the latest stable version ( |
Now that there's a new version, there's a small change to the formatter. This updates the code base for that. Added a small disabling rustfmt: #[cfg_attr(rustfmt, rustfmt_skip)] Reference ticket: rust-lang/rustfmt#2695
Now that there's a new version, there's a small change to the formatter. This updates the code base for that. Added a small disabling rustfmt: #[cfg_attr(rustfmt, rustfmt_skip)] Reference ticket: rust-lang/rustfmt#2695
Yep, it does appear that it isn't broken in the nightly version. When do you think the next version will release? |
Now that there's a new version, there's a small change to the formatter. This updates the code base for that. Added a small disabling rustfmt: #[cfg_attr(rustfmt, rustfmt_skip)] Reference ticket: rust-lang/rustfmt#2695
AFAICT stable rustfmt shipped by rustup is infrequently update, only when the new rustc version is released. So I think that we have to wait for the next rustc's 1.27 release to see stable rustfmt gets updated. |
The version rustup chooses is the submodule on the branch in the Rust repo. We can't change that in stable/beta without doing a point release of Rust itself, which I don't think we can get away with for this. Going to close this issue since it is fixed on master. As a work around I would recommend using beta or nightly, just for rustfmt'ing |
Rust 1.26 was just released and it appears to have changed some aspect of rustfmt as well. I ran
cargo fmt
on my repo (https://github.com/kbacha/stellar-sdk) and pushed the changes. However, it failed on CI because of a format issue. We run a format check so that we don't merge poorly formatted code:https://travis-ci.org/kbacha/stellar-sdk/builds/377478444?utm_source=github_status&utm_medium=notification
I went local again and ran cargo fmt again and got:
and again:
Then I moved to another repo and recreated it here:
https://github.com/kbacha/cargo-fmt-err-1-26
It appears to only matter inside a macro_rules as far as I can tell.
The text was updated successfully, but these errors were encountered: