Skip to content

style: introduce rustfmt.toml#35

Open
AsakuraMizu wants to merge 1 commit intomainfrom
pr/rustfmt
Open

style: introduce rustfmt.toml#35
AsakuraMizu wants to merge 1 commit intomainfrom
pr/rustfmt

Conversation

@AsakuraMizu
Copy link
Copy Markdown
Contributor

Tracking issue: #25

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces a repository-wide rustfmt.toml and reformats existing Rust sources to match the new formatting/import style across supported architectures.

Changes:

  • Add a rustfmt.toml with customized formatting/import rules (incl. comment normalization and enum discriminant alignment).
  • Reformat imports to use nested use ... { ... } style and adjust blank lines for consistency.
  • Apply rustfmt-driven style updates in trap/context/uspace/asm modules across x86_64, riscv, arm/aarch64, and loongarch64.

Reviewed changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/x86_64/uspace.rs Import spacing adjusted to match new formatting rules.
src/x86_64/syscall.rs Imports regrouped into a nested use x86_64::{...} block.
src/x86_64/mod.rs Consolidates and formats re-exports into a single grouped pub use self::{...}.
src/x86_64/init.rs Reformats re-exports into grouped pub use super::{...}.
src/x86_64/idt.rs Regroups x86_64 imports into a nested block.
src/x86_64/gdt.rs Regroups x86_64 imports into a nested block.
src/x86_64/context.rs Adds spacing between std/core and external imports per rustfmt.
src/trap.rs Reorders/reformats public re-exports (linkme + MappingFlags).
src/riscv/uspace.rs Reorders imports and simplifies cfg’d statement formatting.
src/riscv/trap.rs Regroups riscv imports into a nested block.
src/riscv/context.rs Spacing changes; comment normalization in a match arm.
src/riscv/asm.rs Regroups riscv imports into a nested block.
src/loongarch64/context.rs Adds blank line after cfg import.
src/arm/trap.rs Aligns enum discriminants (spacing) per rustfmt config.
src/arm/init.rs Import ordering/spacing adjusted.
src/arm/context.rs Consolidates core imports into use core::{...} and adds spacing.
src/arm/asm.rs Reorders imports to match grouping rules.
src/aarch64/trap.rs Aligns enum discriminants (spacing) per rustfmt config.
src/aarch64/context.rs Consolidates core imports into use core::{...} and adds spacing.
rustfmt.toml New rustfmt configuration driving the formatting changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rustfmt.toml
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