Repository navigation
Conversation
2451609 to
78f7f9e
Compare
78f7f9e to
938632a
Compare
938632a to
28383a8
Compare
28383a8 to
e903008
Compare
e903008 to
1ed4d4b
Compare
1ed4d4b to
82b8149
Compare
e9ab8bf to
e7583f6
Compare
e7583f6 to
338d0fe
Compare
f74837c to
85d06d6
Compare
9a8867e to
57ea173
Compare
57ea173 to
3f83eee
Compare
3f9bb77 to
eb1ca74
Compare
eb1ca74 to
91e1573
Compare
91e1573 to
11cb910
Compare
11cb910 to
46ead06
Compare
46ead06 to
d3b0e62
Compare
thedataking
left a comment
There was a problem hiding this comment.
Review of stack 1953: the implicit-extern snapshot is reverted by this PR and fails with the corrected ABI behavior.
|
|
||
| // =============== BEGIN first_h ================ | ||
| extern "C" { | ||
| extern "Rust" { |
There was a problem hiding this comment.
[P1] Keep the corrected implicit-extern snapshot
Commit 25efe877c restores the pre-fix expectation here, even though #1924 already changed implicit extern blocks to use the C ABI. At stack head, the transform emits one extern "C" declaration in first and redirects the second caller to it; this snapshot instead expects extern "Rust" plus a renamed compute_1.
I ran cargo test --offline -p c2rust-refactor --test snapshots -- --test-threads=1: 54 passed and only test_reorganize_implicit_extern failed on this mismatch. Please drop the snapshot-reverting commit or restore the expectation from #1924.
d3b0e62 to
8a85d07
Compare
8a85d07 to
600a813
Compare
600a813 to
9c8ec4a
Compare
9c8ec4a to
355e66b
Compare
`Regression test: `test_reorganize_implicit_extern` (`tests/snapshots/reorganize_implicit_extern.rs`); on pre-fix code its implicit-`extern` declaration fails to merge with the `extern "C"` duplicate, producing an `extern "Rust"` block and a spurious `compute_1` rename.
Regression test: `test_reorganize_glob_import` (`tests/snapshots/reorganize_glob_import.rs`); verified to reproduce the `UseTree::ident` panic on pre-fix code.
Glob imports are now always kept in their header module: `keep_items` adds them to the keep set, and `insert_item` gained a dedicated `Glob` arm that returns "not collapsed" before any `tree.ident()` call. The other listed call sites (`Extend`, `MovedDecl::ident`) are unreachable for globs once they are never inserted into `HeaderDeclarations`. Nested uses are split (`:427-433`), but globs survive and hit `UseTree::ident()`, which panics for `UseTreeKind::Glob`: - `keep_items` at `:334` - `insert_item` at `:1794-1798` (glob falls into the `_` arm) - `Extend for HeaderDeclarations` at `:1690` - `MovedDecl::ident` at `:1589`
355e66b to
ccfd3b5
Compare
Fresh copy of #1927
Stack created with GitHub Stacks CLI • Give Feedback 💬