refactor: reorganize_definitions: keep glob imports untouched - #1947
Open
ahomescu wants to merge 3 commits into
Open
refactor: reorganize_definitions: keep glob imports untouched
#1947ahomescu wants to merge 3 commits into
ahomescu wants to merge 3 commits into
Conversation
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 05:09
2451609 to
78f7f9e
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 05:33
78f7f9e to
938632a
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 05:41
938632a to
28383a8
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 05:42
28383a8 to
e903008
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/use_comments
to
ahomescu/fix_reorganize_definitions/widen_matched_defs
July 25, 2026 05:48
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 05:48
e903008 to
1ed4d4b
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/widen_matched_defs
to
ahomescu/fix_reorganize_definitions/macro_ns
July 25, 2026 05:53
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 05:53
1ed4d4b to
82b8149
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
2 times, most recently
from
July 25, 2026 06:05
e9ab8bf to
e7583f6
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 25, 2026 06:16
e7583f6 to
338d0fe
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
3 times, most recently
from
July 25, 2026 06:51
f74837c to
85d06d6
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
2 times, most recently
from
July 30, 2026 00:19
9a8867e to
57ea173
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
July 30, 2026 00:31
57ea173 to
3f83eee
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
2 times, most recently
from
July 30, 2026 22:56
e16e815 to
a4ce234
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
2 times, most recently
from
August 4, 2026 02:41
3f9bb77 to
eb1ca74
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
August 5, 2026 00:10
eb1ca74 to
91e1573
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
August 5, 2026 00:19
91e1573 to
11cb910
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
August 5, 2026 00:22
11cb910 to
46ead06
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`
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/glob_imports
branch
from
August 5, 2026 00:43
46ead06 to
d3b0e62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fresh copy of #1927
Stack created with GitHub Stacks CLI • Give Feedback 💬