Conversation
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 25, 2026 03:13
be5a534 to
3ba5ded
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 25, 2026 03:17
3ba5ded to
c4d9955
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 25, 2026 03:26
c4d9955 to
0f16dcf
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/non_ascii_idents
to
master
July 25, 2026 05:09
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 25, 2026 05:09
0f16dcf to
372a77b
Compare
ahomescu
marked this pull request as ready for review
July 25, 2026 05:09
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 25, 2026 05:33
372a77b to
10fb614
Compare
thedataking
reviewed
Jul 28, 2026
thedataking
reviewed
Jul 28, 2026
thedataking
reviewed
Jul 28, 2026
thedataking
requested changes
Jul 28, 2026
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 29, 2026 23:18
10fb614 to
c0eb1ca
Compare
`test_reorganize_foreign_item_rename` records the wrong output `reorganize_definitions` currently produces when it renames a foreign item. Two modules include the same header under different `-D` flags, so their declarations land in one header module but neither the `static` pair nor the `fn` pair can be collapsed, and the second of each is renamed to `cfg_1` and `compute_1`.
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
2 times, most recently
from
July 30, 2026 00:31
2b9dc2b to
37fea26
Compare
thedataking
reviewed
Jul 30, 2026
thedataking
approved these changes
Jul 30, 2026
When two declarations of the same name cannot be collapsed, `move_items` appends a numeric suffix to the second one. That is harmless for a regular item, which is mangled under its own path, but a foreign function or static links against its own name, so renaming it points at a symbol that does not exist and nothing reports it until link time. `MovedDecl::preserve_link_name` now adds a `#[link_name]` with the original name before changing the ident. It applies only to `ForeignItemKind::Fn` and `Static` (an `extern type` has no symbol) and leaves an existing `#[link_name]` alone.
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
from
July 30, 2026 22:54
37fea26 to
9ad3bea
Compare
ahomescu
deleted the
ahomescu/fix_reorganize_definitions/preserve_extern_link_name
branch
July 30, 2026 22:55
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 #1935 since I closed that one.
Stack created with GitHub Stacks CLI • Give Feedback 💬