Skip to content

Handle associated types in const context#70056

Closed
estebank wants to merge 5 commits intorust-lang:masterfrom
estebank:const-context
Closed

Handle associated types in const context#70056
estebank wants to merge 5 commits intorust-lang:masterfrom
estebank:const-context

Conversation

@estebank
Copy link
Contributor

When in const context (like array lengths) we erase all substs.
Because of this, we used to emit spurious suggestions to restrict type
parameters when using associated types on them, even though that would
never work. Instead, we now signal const contexts when evaluating
traits and emit a more accurate error.

Address the diagnostics part of #43408 and #61730.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants