Force nightly rustfmt

2026-11-09来源 Rust Users ForumEnglish

For Reasons™️, I use nightly rustfmt for all my crates.

I configured my vim to pass +nightly when formatting on save, which works fine. However, when others are working on the code I sometimes forget to tell them to switch to nightly rustfmt, which has caused larger diffs than intended.

Someone suggested adding a rust-toolchain.toml to the repos containing:

[toolchain] channel = "nightly" components = ["rustfmt"] 

Would this cause the build to automatically install nightly and its rustfmt if it's not already installed, or would it just fail?

2 posts - 2 participants

Read full topic

原文:https://www.a8q9.cn/en/article/force-nightly-rustfmt-74a8dc.html

相关文章