mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Add rustfmt.toml
(#14072)
We've gotten away without this file for a while. In particular, we explicitly use its default settings. However, this is occasionally problematic in certain contexts where `rustfmt` is invoked directly. Or in contexts where the Rust Edition is otherwise not specified. At least, this happens when using the Rust vim plugin. When an edition isn't explicitly specified, it defaults back to the 2015 edition. I think that there aren't a lot of rustfmt changes, and so we've been able to get away with this for a while. But it looks like something in the 2024 edition changes how imports are ordered. So to make it explicit that we want to use the 2024 edition of rustfmt, we opt into it. This is analogous to a change made to the Ruff repository somewhat recently: https://github.com/astral-sh/ruff/pull/18197
This commit is contained in:
parent
cd71ad1672
commit
5c1ebf902b
1 changed files with 2 additions and 0 deletions
2
rustfmt.toml
Normal file
2
rustfmt.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
edition = "2024"
|
||||
style_edition = "2024"
|
Loading…
Add table
Add a link
Reference in a new issue