Skip to content

resolve: Split extern prelude into two scopes#144793

Merged
bors merged 3 commits intorust-lang:masterfrom
petrochenkov:extprel3
Aug 14, 2025
Merged

resolve: Split extern prelude into two scopes#144793
bors merged 3 commits intorust-lang:masterfrom
petrochenkov:extprel3

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

@petrochenkov petrochenkov commented Aug 1, 2025

One scope for extern crate items and another for --extern options, with the former shadowing the latter.

If in a single scope some things can overwrite other things, especially with ad hoc restrictions like MacroExpandedExternCrateCannotShadowExternArguments, then it's not really a single scope.
So this PR splits Scope::ExternPrelude into two cleaner scopes.

This is similar to how #144131 splits module scope into two scopes for globs and non-globs, but simpler.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-lang-radar Items that are on lang's radar and will need eventual work or consideration. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants