Add rustfmt.toml file by dcreager · Pull Request #18197 · astral-sh/ruff (original) (raw)
added 2 commits
dcreager added a commit that referenced this pull request
- main:
[ty] Infer function call typevars in both directions (#18155)
Add rustfmt.toml file (#18197)
[ty] Update mypy primer (#18196)
[ty] Mark generated files as such in .gitattributes (#18195)
[ty] Support
typing.TypeAliasType(#18156)
BurntSushi added a commit to astral-sh/uv that referenced this pull request
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: astral-sh/ruff#18197
BurntSushi added a commit to astral-sh/uv that referenced this pull request
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: astral-sh/ruff#18197
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})