-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the Trait<Output=Type>
syntax
#18432
Comments
To clarify the specification here, there are two ways to use an equality bound (afaiui) - in where clauses and as a type parameter. E.g.,
The two definitions of |
The 'parameter' form also allows such bounds on trait objects, e.g., |
Yes, though this issue is specific to the |
@nikomatsakis clarifying: the two forms you are discussing are |
@nick29581 sorry, missed that message, I was suggesting only implementing A=Foo and not any equality constraints, since it is more general (works for object types) and covers only the range of constraints we want, but I have no objection to doing more. Anyway, I see you have a PR now, so I guess this is moot. |
r? @nikomatsakis cc @aturon (I think you were interested in this for some library stuff) closes #18432
r? @nikomatsakis cc @aturon (I think you were interested in this for some library stuff) closes #18432
fix: Fix the server not honoring diagnostic refresh support
Today when we expand associated types we always expand to a fresh type parameter. Per the RFC we should support a syntax like:
to permit a trait reference that specifies what to expand an associated type into. This is a subset of full
==
references.Note that cyclic equality does not have to be supported (though it'd be nice if it at least produced a nice error message, not an ICE):
The text was updated successfully, but these errors were encountered: