c2rust-refactor 0.15.0

C2Rust refactoring tool implementation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Test restoration of #[cfg_attr] during macro collapsing.  Both mods' attrs should be passed
// through unmodified.

#[cfg_attr(all(), allow(warnings))]
mod a {}

#[cfg_attr(any(), allow(warnings))]
mod b {}

fn main() {
    // Need something to rewrite, otherwise `-r alongside` won't actually produce the new file.
    let x = 1 + 1;
}