Skip to content

Conversation

@adwinwhite
Copy link
Contributor

@adwinwhite adwinwhite commented Feb 6, 2026

Fixes rust-lang/trait-system-refactor-initiative#264

I didn't copy the mechanism of HIR typeck as I found that we just need to be lax in the unconstrained region case.
It already ignores non-defining uses and invalid params.

This fixes ukanren and codecrafters-redis-rust but not #151322 and #151323.
Looking at the backtraces of them, the ICEs are triggered in HIR typeck so probably a different issue.
Edited: now that I looked at these two issues closer, they seem related. I probably missed something important.

And I'm having trouble coming up with more complex tests. 🙁

r? @lcnr

@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 Feb 6, 2026

type MultiUse2 = impl Sized;
#[define_opaque(MultiUse2)]
fn capture_different_universals_not_on_bounds<'a, 'b, 'c>(a: &'a i32, b: &'b i32, c: &'c i32) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just make sure that we report error for each invalid capture.
In my other attempt, only one unconstrained error per opaque definition is reported.

@adwinwhite adwinwhite marked this pull request as draft February 6, 2026 13:28
@rustbot rustbot 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 Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. 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.

opaque type uses with defining args, but failing member constraints error

3 participants