resolve: Fix ICE on ambiguous glob re-exports#4451
resolve: Fix ICE on ambiguous glob re-exports#4451Harishankar14 wants to merge 1 commit intoRust-GCC:masterfrom
Conversation
|
I think this directly collides with some work from @CohenArthur that refactors the whole re-export mechanisms, I'll let him decide whether we should accept those changes or wait for the use declaration rework. |
|
@P-E-P Alright. |
CohenArthur
left a comment
There was a problem hiding this comment.
Overall I like the changes as they avoid an ICE and they show the proper behavior, but I'm not sure if this is the right place or not. I think maybe those changes should be done more in resolve_rebind_import? I think you are on the right track and I definitely want to get this PR merged
750abce to
d9a99a2
Compare
|
@CohenArthur Thank you. I have updated the changes !! |
|
@P-E-P Thank you for addressing the small details that i had missed. I have fixed it !! |
P-E-P
left a comment
There was a problem hiding this comment.
Looks great, I'll merge this once the remaining blank line will be removed. Great work!
| } | ||
|
|
||
| for (auto &&definition : data.definitions ()) | ||
|
|
There was a problem hiding this comment.
This blank line isn't required and is confusing
There was a problem hiding this comment.
yep, me being silly again :)
This patch adds an ambiguity check in 'finalize_rebind_import'. If a Definition is ambiguous, it emits a proper error diagnostic instead of crashing, consistent with rustc's behavior(verified) Fixes Rust-GCC#4411 gcc/rust/ChangeLog: * resolve/rust-early-name-resolver-2.0.cc (Early::finalize_rebind_import): Add ambiguity check before calling get_node_id() on glob import definitions. gcc/testsuite/ChangeLog: * rust/compile/issue-4411.rs: New test. Signed-off-by: Harishankar <[email protected]>
|
@P-E-P should be okay now ? |
This patch adds an ambiguity check in 'finalize_rebind_import'. If a Definition is ambiguous, it emits a proper error diagnostic instead of crashing, consistent with rustc's behavior(verified)
Fixes #4411
gcc/rust/ChangeLog:
gcc/testsuite/ChangeLog:
Thank you for making Rust GCC better!
If your PR fixes an issue, you can add "Fixes #issue_number" into this
PR description and the git commit message. This way the issue will be
automatically closed when your PR is merged. If your change addresses
an issue but does not fully fix it please mark it as "Addresses #issue_number"
in the git commit message.
Here is a checklist to help you with your PR.
make check-rustpasses locallyclang-formatgcc/testsuite/rust/Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.
*Please write a comment explaining your change. This is the message
that will be part of the merge commit.