Skip to content

refactor: avoid reordering attributes when restoring them#1433

Merged
fw-immunant merged 2 commits intomasterfrom
fw/refactor-derives
Feb 20, 2026
Merged

refactor: avoid reordering attributes when restoring them#1433
fw-immunant merged 2 commits intomasterfrom
fw/refactor-derives

Conversation

@fw-immunant
Copy link
Copy Markdown
Contributor

@fw-immunant fw-immunant commented Oct 24, 2025

including in the presence of multiple #[derive(...)] attributes interleaved with other attributes. No test at present; I'll look into adding one.

@fw-immunant fw-immunant requested a review from ahomescu October 24, 2025 21:01
@fw-immunant
Copy link
Copy Markdown
Contributor Author

fw-immunant commented Oct 24, 2025

I added a test but I'm not sure that these c2rust-refactor tests are actually run in CI.

It seems like we're not running scripts/test_rust_refactor.py.

Copy link
Copy Markdown
Contributor

@kkysen kkysen left a comment

Choose a reason for hiding this comment

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

Is this why stuff like #[c2rust::src_loc = "125:8"]#[derive(Copy, Clone)] is happening? I noticed that while testing crisp.

@fw-immunant
Copy link
Copy Markdown
Contributor Author

Is this why stuff like #[c2rust::src_loc = "125:8"]#[derive(Copy, Clone)] is happening? I noticed that while testing crisp.

Yeah, this PR fixes that weird formatting.

@ahomescu
Copy link
Copy Markdown
Contributor

We should land this.

@fw-immunant fw-immunant changed the base branch from master to kkysen/refactor-snapshot-tests-named February 20, 2026 15:49
Base automatically changed from kkysen/refactor-snapshot-tests-named to master February 20, 2026 18:37
@fw-immunant fw-immunant merged commit ad67de6 into master Feb 20, 2026
11 checks passed
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.

c2rust-refactor moves derive attributes

3 participants