Open
Conversation
Contributor
There was a problem hiding this comment.
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.tomlwith 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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking issue: #25