Avoid projection-only suggestions for inherent assoc types#153643
Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom Mar 11, 2026
Merged
Avoid projection-only suggestions for inherent assoc types#153643rust-bors[bot] merged 3 commits intorust-lang:mainfrom
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
Conversation
Collaborator
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Kivooeo
approved these changes
Mar 10, 2026
tests/ui/associated-inherent-types/inherent-assoc-ty-mismatch-issue-153539.rs
Outdated
Show resolved
Hide resolved
Member
|
r? me @bors r+ rollup |
Contributor
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 10, 2026
Avoid projection-only suggestions for inherent assoc types Fixes rust-lang#153539. Type mismatch diagnostics in `note_and_explain_type_err` currently route both `ty::Projectio`n and `ty::Inherent` through the same associated-type suggestion path. For inherent associated types, that path can reach helpers that are only valid for trait projections.
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 10, 2026
Avoid projection-only suggestions for inherent assoc types Fixes rust-lang#153539. Type mismatch diagnostics in `note_and_explain_type_err` currently route both `ty::Projectio`n and `ty::Inherent` through the same associated-type suggestion path. For inherent associated types, that path can reach helpers that are only valid for trait projections.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 8 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153641 (Move `Spanned`.) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 8 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153641 (Move `Spanned`.) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 8 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153641 (Move `Spanned`.) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 8 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153641 (Move `Spanned`.) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 10, 2026
Avoid projection-only suggestions for inherent assoc types Fixes rust-lang#153539. Type mismatch diagnostics in `note_and_explain_type_err` currently route both `ty::Projectio`n and `ty::Inherent` through the same associated-type suggestion path. For inherent associated types, that path can reach helpers that are only valid for trait projections.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 13 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153471 (Refactor `ActiveJobGuard`) - #153595 (`QueryLatch` cleanups) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153479 (Add rationale for intentional potential_query_instability allows) - #153600 (add test for proc-macros with custom panic payloads) - #153641 (Move `Spanned`.) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups) - #153659 (Mark an unreachable match arm as such)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 13 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153471 (Refactor `ActiveJobGuard`) - #153595 (`QueryLatch` cleanups) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153479 (Add rationale for intentional potential_query_instability allows) - #153600 (add test for proc-macros with custom panic payloads) - #153641 (Move `Spanned`.) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups) - #153659 (Mark an unreachable match arm as such)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Mar 10, 2026
Avoid projection-only suggestions for inherent assoc types Fixes rust-lang#153539. Type mismatch diagnostics in `note_and_explain_type_err` currently route both `ty::Projectio`n and `ty::Inherent` through the same associated-type suggestion path. For inherent associated types, that path can reach helpers that are only valid for trait projections.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 14 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #152457 (Pass -pg to linker when using -Zinstrument-mcount) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153471 (Refactor `ActiveJobGuard`) - #153595 (`QueryLatch` cleanups) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153283 (feat(rustdoc-json): Add optional support for rkyv (de)serialization) - #153479 (Add rationale for intentional potential_query_instability allows) - #153533 (Fix LegacyKeyValueFormat report from docker build: miscellaneous) - #153600 (add test for proc-macros with custom panic payloads) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups) - #153659 (Mark an unreachable match arm as such)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 13 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153471 (Refactor `ActiveJobGuard`) - #153595 (`QueryLatch` cleanups) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153283 (feat(rustdoc-json): Add optional support for rkyv (de)serialization) - #153479 (Add rationale for intentional potential_query_instability allows) - #153533 (Fix LegacyKeyValueFormat report from docker build: miscellaneous) - #153600 (add test for proc-macros with custom panic payloads) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups) - #153659 (Mark an unreachable match arm as such)
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 10, 2026
…uwer Rollup of 13 pull requests Successful merges: - #149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - #153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - #153471 (Refactor `ActiveJobGuard`) - #153595 (`QueryLatch` cleanups) - #153653 (scalable vector: type renames and simple checks) - #152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - #153283 (feat(rustdoc-json): Add optional support for rkyv (de)serialization) - #153479 (Add rationale for intentional potential_query_instability allows) - #153533 (Fix LegacyKeyValueFormat report from docker build: miscellaneous) - #153600 (add test for proc-macros with custom panic payloads) - #153643 (Avoid projection-only suggestions for inherent assoc types) - #153657 (triagebot: remove myself from some mention groups) - #153659 (Mark an unreachable match arm as such)
rust-timer
added a commit
that referenced
this pull request
Mar 11, 2026
Rollup merge of #153643 - TaKO8Ki:issue-153539, r=Kivooeo Avoid projection-only suggestions for inherent assoc types Fixes #153539. Type mismatch diagnostics in `note_and_explain_type_err` currently route both `ty::Projectio`n and `ty::Inherent` through the same associated-type suggestion path. For inherent associated types, that path can reach helpers that are only valid for trait projections.
Delta17920
pushed a commit
to Delta17920/rust
that referenced
this pull request
Mar 11, 2026
…nathanBrouwer Rollup of 13 pull requests Successful merges: - rust-lang#149130 (Implement coercions between `&pin (mut|const) T` and `&(mut) T` when `T: Unpin`) - rust-lang#153143 (Allow `./x test` to run tests without doc tests and without benchmarks) - rust-lang#153471 (Refactor `ActiveJobGuard`) - rust-lang#153595 (`QueryLatch` cleanups) - rust-lang#153653 (scalable vector: type renames and simple checks) - rust-lang#152302 (fix: don't suggest replacing `env!("CARGO_BIN_NAME")` with itself) - rust-lang#153283 (feat(rustdoc-json): Add optional support for rkyv (de)serialization) - rust-lang#153479 (Add rationale for intentional potential_query_instability allows) - rust-lang#153533 (Fix LegacyKeyValueFormat report from docker build: miscellaneous) - rust-lang#153600 (add test for proc-macros with custom panic payloads) - rust-lang#153643 (Avoid projection-only suggestions for inherent assoc types) - rust-lang#153657 (triagebot: remove myself from some mention groups) - rust-lang#153659 (Mark an unreachable match arm as such)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #153539.
Type mismatch diagnostics in
note_and_explain_type_errcurrently route bothty::Projection andty::Inherentthrough the same associated-type suggestion path. For inherent associated types, that path can reach helpers that
are only valid for trait projections.