-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Suggest correct syntax when writing type arg instead of assoc type #55808
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
The output can still be improved, IMO
The span pointing at the associated type definition span seems superfluous (at least without the corresponding trait's def span) and the wording could do with some copy editing. |
This comment has been minimized.
This comment has been minimized.
"type value" is not good IMO. How about
and
|
@bors r+ |
📌 Commit 5f569e2b43b455b7c4bdf6469ecb05829dba1461 has been approved by |
☔ The latest upstream changes (presumably #55859) made this pull request unmergeable. Please resolve the merge conflicts. |
5f569e2
to
5cbd6e3
Compare
@bors r=petrochenkov |
📌 Commit 5cbd6e3df7cbd2c613af6d8dc0faf0663bbe2e36 has been approved by |
⌛ Testing commit 5cbd6e3df7cbd2c613af6d8dc0faf0663bbe2e36 with merge 42741ddb5182fac9cb0afb1f8425ae963b0b9db4... |
💔 Test failed - status-travis |
This comment has been minimized.
This comment has been minimized.
When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
This is a somewhat arbitrary restriction in order to be consistent in the output of the tests regardless of target platform.
5cbd6e3
to
510f836
Compare
@bors r=petrochenkov |
📌 Commit 510f836 has been approved by |
Suggest correct syntax when writing type arg instead of assoc type - When confusing an associated type with a type argument, suggest the appropriate syntax. Given `Iterator<isize>`, suggest `Iterator<Item = isize>`. - When encountering multiple missing associated types, emit only one diagnostic. - Point at associated type def span for context. - Point at each extra type argument. Follow up to #48288, fix #20977.
☀️ Test successful - status-appveyor, status-travis |
Iterator<isize>
, suggestIterator<Item = isize>
.Follow up to #48288, fix #20977.