Point to lifetime spans on lifetime errors#51862
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
This loop feels like something that occurs more often (e.g. in lowering code or other diagnostics). Maybe pull it out into a method on Generics and do a quick grep around the source to see if any other places could benefit from an fn(&Generics, Name) -> Option<&Param>
There was a problem hiding this comment.
I made a cursory look for other possible uses but I couldn't any. I'm sure I'll find some while working on something else down the line, though.
This comment has been minimized.
This comment has been minimized.
nikomatsakis
left a comment
There was a problem hiding this comment.
Looks good, if we extract a helper would look better. 😛
There was a problem hiding this comment.
I agree with @oli-obk that we should not "open code" this loop but rather extract a helper. Bonus points for finding other code to use it =)
There was a problem hiding this comment.
If nothing else, the same loop seems to be down here?
|
Helper added. |
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
|
📌 Commit 8449c5a has been approved by |
…akis Point to lifetime spans on lifetime errors
Point to lifetime spans on lifetime errors
|
☀️ Test successful - status-appveyor, status-travis |
No description provided.