Skip to content

Handle RTN projections in assoc type restriction diagnostics#154932

Merged
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
TaKO8Ki:fix-152887-rtn-assoc-type-name
Apr 13, 2026
Merged

Handle RTN projections in assoc type restriction diagnostics#154932
rust-bors[bot] merged 4 commits intorust-lang:mainfrom
TaKO8Ki:fix-152887-rtn-assoc-type-name

Conversation

@TaKO8Ki
Copy link
Copy Markdown
Member

@TaKO8Ki TaKO8Ki commented Apr 7, 2026

Fixes #152887

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 7, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 7, 2026

r? @jackh726

rustbot has assigned @jackh726.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 10 candidates

Copy link
Copy Markdown
Member

@fmease fmease Apr 8, 2026

Choose a reason for hiding this comment

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

View changes since the review

As I said before, could you please further reduce any potential reproducers if they're not minimal enough yet (e.g., by removing unnecessary elements and unnecessary user errors)?

This would be tremendously helpful for other contributors to reason about it. They might want to extend this test file with more test cases years down the line or they see this test failing after modifying the compiler in which case it's very beneficial if the test is easy to digest instead of being a giant blob you first have to wade through. The extra fluff certainly won't increase test coverage by much.

E.g., the code below can be shrunk to the following (maybe even further) while still reproducing the ICE:

#![feature(return_type_notation)]

pub trait Trait { async fn func(); }

impl<T: Trait<func(..): Send>> Trait for T {}

fn check(_: impl Trait) {}

fn main() { check(()); }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Oh. Sorry, I completely missed your earlier comment. I’ll reduce the reproducers further.

Copy link
Copy Markdown
Member

@jackh726 jackh726 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 moving the test

View changes since this review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this test in traits/next-solver? It's not an issue with the next solver...only RTN?

@TaKO8Ki TaKO8Ki force-pushed the fix-152887-rtn-assoc-type-name branch from 5d5fc7c to 9339abb Compare April 13, 2026 09:05
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 13, 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.

@TaKO8Ki
Copy link
Copy Markdown
Member Author

TaKO8Ki commented Apr 13, 2026

@bors r=jackh726

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 13, 2026

📌 Commit 9339abb has been approved by jackh726

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Apr 13, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 13, 2026
…name, r=jackh726

Handle RTN projections in assoc type restriction diagnostics

Fixes rust-lang#152887
rust-bors Bot pushed a commit that referenced this pull request Apr 13, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #155227 (`rust-analyzer` subtree update)
 - #153335 (Add #![unstable_removed(..)] attribute to track removed features)
 - #154932 (Handle RTN projections in assoc type restriction diagnostics)
 - #155096 (delegation: support proper interaction of user-specified args and impl Traits)
 - #155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`)
 - #155140 (add regression test for OpenOptionsExt downstream compat)
 - #155182 (Make the expansion of guard metavars begin guard non-terminals)
 - #155226 (delegation: revert execution of hir_crate_items before delayed lowering)
 - #153997 (Use closures more consistently in `dep_graph.rs`.)
 - #155003 (update thin-vec)
@rust-bors rust-bors Bot merged commit 7370657 into rust-lang:main Apr 13, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 13, 2026
rust-timer added a commit that referenced this pull request Apr 13, 2026
Rollup merge of #154932 - TaKO8Ki:fix-152887-rtn-assoc-type-name, r=jackh726

Handle RTN projections in assoc type restriction diagnostics

Fixes #152887
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Apr 13, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#155227 (`rust-analyzer` subtree update)
 - rust-lang/rust#153335 (Add #![unstable_removed(..)] attribute to track removed features)
 - rust-lang/rust#154932 (Handle RTN projections in assoc type restriction diagnostics)
 - rust-lang/rust#155096 (delegation: support proper interaction of user-specified args and impl Traits)
 - rust-lang/rust#155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`)
 - rust-lang/rust#155140 (add regression test for OpenOptionsExt downstream compat)
 - rust-lang/rust#155182 (Make the expansion of guard metavars begin guard non-terminals)
 - rust-lang/rust#155226 (delegation: revert execution of hir_crate_items before delayed lowering)
 - rust-lang/rust#153997 (Use closures more consistently in `dep_graph.rs`.)
 - rust-lang/rust#155003 (update thin-vec)
github-actions Bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Apr 16, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#155227 (`rust-analyzer` subtree update)
 - rust-lang/rust#153335 (Add #![unstable_removed(..)] attribute to track removed features)
 - rust-lang/rust#154932 (Handle RTN projections in assoc type restriction diagnostics)
 - rust-lang/rust#155096 (delegation: support proper interaction of user-specified args and impl Traits)
 - rust-lang/rust#155106 (cg_llvm: scalable vectors with `simd_cast` and `simd_select`)
 - rust-lang/rust#155140 (add regression test for OpenOptionsExt downstream compat)
 - rust-lang/rust#155182 (Make the expansion of guard metavars begin guard non-terminals)
 - rust-lang/rust#155226 (delegation: revert execution of hir_crate_items before delayed lowering)
 - rust-lang/rust#153997 (Use closures more consistently in `dep_graph.rs`.)
 - rust-lang/rust#155003 (update thin-vec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ICE]: item_name: no name for DefPath

4 participants