Uh oh!
There was an error while loading. Please reload this page.
Point to where clause for GATs to add bound - #87478
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Aug 12, 2021
☔ The latest upstream changes (presumably #87948) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Let's make the suggestion a bit easier to read, given that it points at a span right in the middle of a larger span:
| err.span_suggestion( | |
| err.span_suggestion_verbose( |
There was a problem hiding this comment.
Although that would require rewording the other span label...
There was a problem hiding this comment.
I leave it to your decision what to do here.
There was a problem hiding this comment.
So, now that the associated type points to the type itself, not the whole defintion, they don't overlap anymore.
I do think the verbose suggestion would be nice, but I'll leave that as a followup.
There was a problem hiding this comment.
Can we mark the tests // run-rustfix?
There was a problem hiding this comment.
So...no. The suggestion here doesn't actually result in code that compiles, because it causes the where clauses not to match the trait's where clauses. (In fact, in this case, we can't write this where clause in the trait, we would have to use Self)
Unfortunately, that's a whole separate issue with GATs. But applying the current suggestion should help, in the future, to guide the user towards matching the trait's where clauses.
estebank
commented
Aug 12, 2021
r=me after cleaning up the commented out code. |
jackh726
commented
Aug 13, 2021
@bors r=estebank |
bors
commented
Aug 13, 2021
📌 Commit 22fc7d6 has been approved by |
bors
commented
Aug 13, 2021
bors
commented
Aug 14, 2021
☀️ Test successful - checks-actions |
Fixes#84931
r? @estebank