Skip to content

resolve: Partially convert ambiguous_glob_imports lint into a hard error#149195

Open
petrochenkov wants to merge 1 commit into
rust-lang:mainfrom
petrochenkov:globamberr
Open

resolve: Partially convert ambiguous_glob_imports lint into a hard error#149195
petrochenkov wants to merge 1 commit into
rust-lang:mainfrom
petrochenkov:globamberr

Conversation

@petrochenkov
Copy link
Copy Markdown
Contributor

@petrochenkov petrochenkov commented Nov 21, 2025

View all comments

I'm tired of this logic interfering with any attempts to fix or refactor glob imports.

Change description for lang team: #149195 (comment).
Part of #114095.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Nov 21, 2025

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 21, 2025
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Nov 21, 2025

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot added a commit that referenced this pull request Nov 21, 2025
resolve: Convert `ambiguous_glob_imports` lint into a hard error
@petrochenkov petrochenkov added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 21, 2025
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Nov 21, 2025

☀️ Try build successful (CI)
Build commit: 446cb60 (446cb600aa4837dd6c513f14fa0d25a909b177d7, parent: e22dab387f6b4f6a87dfc54ac2f6013dddb41e68)

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@craterbot check

@craterbot
Copy link
Copy Markdown
Collaborator

👌 Experiment pr-149195 created and queued.
🤖 Automatically detected try build 446cb60
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@bors

This comment was marked as resolved.

@craterbot
Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-149195 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-149195 is completed!
📊 2676 regressed and 6 fixed (741888 total)
📊 2000 spurious results on the retry-regessed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-149195/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Dec 1, 2025
@nnethercote
Copy link
Copy Markdown
Contributor

@petrochenkov: seems like a lot of regressions :( Should I review this?

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@petrochenkov: seems like a lot of regressions :( Should I review this?

Not yet.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 1, 2025
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Dec 1, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

The largest part of the regressions are from openssl-0.10.*, it's a known issue that is addressed by #147984.
So this is blocked by #147984 now.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 1, 2025
@yaahc
Copy link
Copy Markdown
Member

yaahc commented Dec 9, 2025

Correct me if I'm wrong on this one

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Dec 9, 2025
@tmandry
Copy link
Copy Markdown
Member

tmandry commented May 6, 2026

@rfcbot reviewed

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@joshtriplett
Copy link
Copy Markdown
Member

Is there an FCW that will get emitted if the crate-specific hacks get hit?

@petrochenkov
Copy link
Copy Markdown
Contributor Author

Is there an FCW that will get emitted if the crate-specific hacks get hit?

Yes, ambiguous_glob_imports.
Crate-specific hacks in this case turn a hard error into the lint (which is deny-by-default and report-in-deps now).

@rust-rfcbot
Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@rustbot

This comment has been minimized.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@rustbot ready
r? @mu001999

Copy link
Copy Markdown
Member

@mu001999 mu001999 left a comment

Choose a reason for hiding this comment

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

Comment thread compiler/rustc_lint_defs/src/builtin.rs
Comment thread compiler/rustc_resolve/src/imports.rs
@rustbot

This comment has been minimized.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@rustbot ready

Copy link
Copy Markdown
Member

@mu001999 mu001999 left a comment

Choose a reason for hiding this comment

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

r=me after CI green

View changes since this review

@petrochenkov
Copy link
Copy Markdown
Contributor Author

@bors r=mu001999

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 27, 2026

📌 Commit a0a7e16 has been approved by mu001999

It is now in the queue for this repository.

@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 27, 2026

💔 Test for ba66bad failed: CI. Failed job:

@petrochenkov
Copy link
Copy Markdown
Contributor Author

Ugh, I'll try to send a fix to net2, although it was last updated 3 years ago.
@alexcrichton will you accept a patch to https://crates.io/crates/net2 just to fix cargotest?

The root test is this cargotest:

    Test {
        name: "iron",
        repo: "https://github.com/iron/iron",
        sha: "cf056ea5e8052c1feea6141e40ab0306715a2c33",
        lock: None,
        packages: &[],
        features: None,
        manifest_path: None,
        filters: &[],
    },

There's no lock, so I guess the update to net2 should propagate.
iron was also not updated for 5 years.

I guess the alternative is removing iron from cargotest.

@alexcrichton
Copy link
Copy Markdown
Member

I unfortunately don't have access to the git repo any more (I think I transferred that many years ago), so if it's workable I suspect the best way forward is removing (or updating) the really old cargotest

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 29, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 29, 2026

⚠️ A new commit 15b13982bfa68131fdc5e46ba5f947e478b98eda was pushed.

This PR was contained in a rollup (#157028), which was closed.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

I've added one more crate-specific exception for net2 to avoid blocking this PR on cargotest or fixing net2 itself.
@bors r=mu001999

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 29, 2026

📌 Commit 15b1398 has been approved by mu001999

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened.

@petrochenkov
Copy link
Copy Markdown
Contributor Author

The fix to net2 is submitted in deprecrated/net2-rs#117.

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

Labels

A-resolve Area: Name/path resolution done by `rustc_resolve` specifically disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team to-announce Announce this issue on triage meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.