Skip to content

style: refactor import layout - #748

Draft
xtqqczze wants to merge 1 commit into
rust-lang:mainfrom
xtqqczze:import-layout
Draft

style: refactor import layout#748
xtqqczze wants to merge 1 commit into
rust-lang:mainfrom
xtqqczze:import-layout

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Configure rustfmt to use vertical import formatting and apply the new layout throughout the crate.

  • Update rustfmt configuration and reformat imports throughout.
  • Group related imports into multi-line use statements.

Use the following import order:

  1. core::
  2. std::
  3. external crates
  4. crate::
  5. super::
  6. self::

@xtqqczze

xtqqczze commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@clarfonthey Doesn't look like cargo fmt --all -- --check is using nightly in ci/tools.sh

@clarfonthey

Copy link
Copy Markdown
Contributor

Ah, I thought it was. Either way, that should be an easy change.

@xtqqczze

xtqqczze commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@clarfonthey Right, I'm not completely sure how ci/tools.sh works, would you mind taking a look? And what do you think about the changes in principle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants