Skip to content

gccrs: Make extern crate self resolve to current crate#4570

Merged
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
Polygonalr:self-crate-resolve
Jun 3, 2026
Merged

gccrs: Make extern crate self resolve to current crate#4570
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
Polygonalr:self-crate-resolve

Conversation

@Polygonalr

Copy link
Copy Markdown
Contributor

gcc/rust/ChangeLog:

	* resolve/rust-default-resolver.h (DefaultResolver): Add new visited_crates
	member for recursion protection.
	* resolve/rust-default-resolver.cc (DefaultResolver::visit(ExternCrate)):
	Make references of `self` resolve to the current crate.

Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>

@CohenArthur CohenArthur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good find

@CohenArthur CohenArthur added this pull request to the merge queue Jun 3, 2026
Merged via the queue into Rust-GCC:master with commit 367269f Jun 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants