Skip to content

Conversation

@fw-immunant
Copy link
Contributor

Fixes #1426, 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
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
Contributor

@kkysen kkysen Oct 28, 2025

Choose a reason for hiding this comment

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

Can this just be written as a Rust #[test] instead? cargo test is run in CI.

Copy link
Contributor

Choose a reason for hiding this comment

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

test_rust_refactor.py is pretty small (unlike test_translator.py), and it makes a lot of things more seamless to keep it all in cargo test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do want to test end-to-end refactorer behavior here if possible, so if you have a suggestion on how to express that as a #[test] (e.g. setting up integrated snapshot testing for the refactorer), I'm all ears.

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

4 participants