refactor: avoid reordering attributes when restoring them#1433
refactor: avoid reordering attributes when restoring them#1433fw-immunant wants to merge 2 commits intomasterfrom
Conversation
|
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 |
There was a problem hiding this comment.
Can this just be written as a Rust #[test] instead? cargo test is run in CI.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
9a2ef27 to
1251c6c
Compare
kkysen
left a comment
There was a problem hiding this comment.
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. |
including in the presence of multiple
#[derive(...)]attributes interleaved with other attributes. No test at present; I'll look into adding one.