Skip to content

Add regression test for trait on next solver - #161170

Open
lsunsi wants to merge 1 commit into
rust-lang:mainfrom
lsunsi:issue151306
Open

Add regression test for trait on next solver#161170
lsunsi wants to merge 1 commit into
rust-lang:mainfrom
lsunsi:issue151306

Conversation

@lsunsi

@lsunsi lsunsi commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Closes #151306.

The new test crashes on commit 37d85e5 (nightly-2026-04-29).
The new test fails (but not crashes) due to different stderr since c935696 (nightly-2026-04-30).
Ofc the test passes on current version.

Also, I took the liberty of adding a few bits of code to the minimal reproduction shared in the original issue just to make the stderr less verbose and we can focus on the issue that really matters. So I added main, removed the lifetimes, etc.

It's more code, but I'd argue is easier to reason for a test, although I'd obviously revert back to the minimal example if the reviewer thinks it's best.

@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 Aug 16, 2026
@rustbot

rustbot commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
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 75 candidates
  • Random selection from 19 candidates


pub trait Bar: Sized {
async fn new() -> impl Fn<()> {
//~^ ERROR: the precise format of `Fn`-family traits' type parameters is subject to change

@lsunsi lsunsi Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The four identical errors seem a little verbose and I couldn't reproduce them in a new project (where it only showed one of them). Should this be a diagnostics issue?

View changes since the review

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

Labels

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE: assertion left == right failed [Goal .. == [ ]

3 participants