Skip to content

Conversation

@petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Oct 22, 2025

One of unblocking steps for #145108.
Fixes #147992.

@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 Oct 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 22, 2025

r? @madsmtm

rustbot has assigned @madsmtm.
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
Contributor Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 22, 2025
resolve: Do not consider traits from ambiguous imports to be in scope
@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 Oct 22, 2025
@petrochenkov
Copy link
Contributor Author

cc @LorrensP-2158466

@rust-bors
Copy link

rust-bors bot commented Oct 22, 2025

☀️ Try build successful (CI)
Build commit: ed60662 (ed606620234c6b50f2414162c4bbabd5f4a925f3, parent: f5e2df741b4a9820a7579f0c8eccc951706a8782)

@petrochenkov
Copy link
Contributor Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-147995 created and queued.
🤖 Automatically detected try build ed60662
🔍 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

@craterbot
Copy link
Collaborator

🚧 Experiment pr-147995 is now running

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

impl Trait for u8 {}
}

fn test1() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Could you add #[rustfmt::skip] to this and test2, I'd be worried about the test no longer testing the right thing if someone decided to reformat these.

Copy link
Contributor

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

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

This makes sense to me, and I agree that it needs a crater run.

View changes since this review

@craterbot
Copy link
Collaborator

🎉 Experiment pr-147995 is completed!
📊 135 regressed and 3 fixed (721923 total)
📊 1777 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-147995/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 Oct 25, 2025
@petrochenkov petrochenkov 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 Oct 27, 2025
@petrochenkov
Copy link
Contributor Author

All the root regressions (31 of them) are

error[E0599]: no method named `method` found for type `Type` in the current scope

, as expected.
Also many non-root regressions in crates depending on various versions of sophia_api and polars-plan.

I guess we need to somehow preserve these traits in scope, but keep them poisoned, so an error (or a lint) can be reported later during type checking.

@madsmtm
Copy link
Contributor

madsmtm commented Oct 28, 2025

I guess we need to somehow preserve these traits in scope, but keep them poisoned, so an error (or a lint) can be reported later during type checking.

Or a FCW, I think it makes sense to break this someday.

@yaahc yaahc added the A-resolve Area: Name/path resolution done by `rustc_resolve` specifically label Oct 28, 2025
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

how difficult is the alternative of treating overlapping trait wildcard imports as use module::Trait as _; instead

View changes since this review

@petrochenkov
Copy link
Contributor Author

I guess we need to somehow preserve these traits in scope, but keep them poisoned, so an error (or a lint) can be reported later during type checking.

Or a FCW, I think it makes sense to break this someday.

FCW will also have to be reported in type checking, can't do that without keeping the poisoned traits in scope.

@petrochenkov
Copy link
Contributor Author

how difficult is the alternative of treating overlapping trait wildcard imports as use module::Trait as _; instead

View changes since this review

I'll try to implement both the alternatives and look what's simpler.

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 S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

The set of traits in scope behaves unpredictably in presence of ambiguous glob imports

7 participants