Skip to content

Conversation

@fmease
Copy link
Member

@fmease fmease commented Nov 9, 2025

Apparently, some people are already using IATs in their projects and get blocked by #142006 (comment) (cc dupes #143952 & #148535). Since the (temporary) fix is so trivial, let's just do it.

Addresses #142006 (comment).

cc @luissantosHCIT (#148535).

r? @BoxyUwU

@fmease fmease added F-inherent_associated_types `#![feature(inherent_associated_types)]` T-types Relevant to the types team, which will review and decide on the PR/issue. labels Nov 9, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 9, 2025

BoxyUwU is currently at their maximum review capacity.
They may take a while to respond.

Some(InherentAssocCandidate { impl_, assoc_item: item.def_id, scope })
})
.collect();

Copy link
Member Author

@fmease fmease Nov 9, 2025

Choose a reason for hiding this comment

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

Obviously this is but a hotfix for a minute part of #142006. I was briefly toying with the idea of properly addressing #142006 now but for that I would need to rewrite type-relative path resolution in HIR ty lowering to properly assemble inherent & trait candidates (instead of eagerly trying to resolve them in sequence) but I realized I would only be stepping on your toes / doing throwaway work (#145825).

Copy link
Member Author

@fmease fmease Nov 9, 2025

Choose a reason for hiding this comment

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

I wrote this test and it's rooted in a deep misconception, namely that there can't ever be a case where we would pick a trait candidate over an inherent one. Back then I didn't know about #142006.

In essence, I don't like this test, hence its removal. Once we fix #142006, we'll have plenty of tests regarding "candidate preference/elimination".

@fmease fmease force-pushed the iat-reinstate-early-elim branch from 129c7f0 to a9fd741 Compare November 9, 2025 21:46
@fmease fmease force-pushed the iat-reinstate-early-elim branch from a9fd741 to 6ed469c Compare November 9, 2025 21:53
@fmease fmease changed the title Reinstate early IAT candidate elimination IAT: Reinstate early bailout Nov 9, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Nov 10, 2025

@bors r+

lgtm. i thought i'd get around to fixing type relative path lowering sooner than it seems like I actually am going to be so this seems reasonable for the time being

@bors
Copy link
Collaborator

bors commented Nov 10, 2025

📌 Commit 6ed469c has been approved by BoxyUwU

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 10, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 10, 2025
…=BoxyUwU

IAT: Reinstate early bailout

Apparently, some people are already using IATs in their projects and get blocked by rust-lang#142006 (comment) (cc dupes rust-lang#143952 & rust-lang#148535). Since the (temporary) fix is so trivial, let's just do it.

Addresses rust-lang#142006 (comment).

cc `@luissantosHCIT` (rust-lang#148535).

r? `@BoxyUwU`
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 10, 2025
…=BoxyUwU

IAT: Reinstate early bailout

Apparently, some people are already using IATs in their projects and get blocked by rust-lang#142006 (comment) (cc dupes rust-lang#143952 & rust-lang#148535). Since the (temporary) fix is so trivial, let's just do it.

Addresses rust-lang#142006 (comment).

cc ``@luissantosHCIT`` (rust-lang#148535).

r? ``@BoxyUwU``
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 11, 2025
…=BoxyUwU

IAT: Reinstate early bailout

Apparently, some people are already using IATs in their projects and get blocked by rust-lang#142006 (comment) (cc dupes rust-lang#143952 & rust-lang#148535). Since the (temporary) fix is so trivial, let's just do it.

Addresses rust-lang#142006 (comment).

cc ``@luissantosHCIT`` (rust-lang#148535).

r? ``@BoxyUwU``
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 11, 2025
…=BoxyUwU

IAT: Reinstate early bailout

Apparently, some people are already using IATs in their projects and get blocked by rust-lang#142006 (comment) (cc dupes rust-lang#143952 & rust-lang#148535). Since the (temporary) fix is so trivial, let's just do it.

Addresses rust-lang#142006 (comment).

cc ```@luissantosHCIT``` (rust-lang#148535).

r? ```@BoxyUwU```
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 13 pull requests

Successful merges:

 - #148694 (std: support `RwLock` and thread parking on TEEOS)
 - #148712 (Port `cfg_select!` to the new attribute parsing system)
 - #148760 (rustc_target: hide TargetOptions::vendor)
 - #148771 (IAT: Reinstate early bailout)
 - #148775 (Fix a typo in the documentation for the strict_shr function)
 - #148779 (Implement DynSend and DynSync for std::panic::Location.)
 - #148781 ([rustdoc] Remove unneeded `allow(rustc::potential_query_instability)`)
 - #148783 (add test for assoc type norm wf check)
 - #148785 (Replace `master` branch references with `main`)
 - #148791 (fix "is_closure_like" doc comment)
 - #148792 (Prefer to use file.stable_id over file.name from source map)
 - #148805 (rustc-dev-guide subtree update)
 - #148807 (Document (and test) a problem with `Clone`/`Copy` deriving.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-inherent_associated_types `#![feature(inherent_associated_types)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

Development

Successfully merging this pull request may close these issues.

4 participants