Lengthen the span label to include match and expr for E0004#35485
Lengthen the span label to include match and expr for E0004#35485bors merged 1 commit intorust-lang:masterfrom
Conversation
|
Thanks! @bors: r+ rollup |
|
📌 Commit 06133c5 has been approved by |
|
⌛ Testing commit 06133c5 with merge 8a4641b... |
Lengthen the span label to include match and expr for E0004 Part of #35233. Extension of #35191. r? @GuillaumeGomez
|
@GuillaumeGomez, @KiChjang Manually altering spans like this is not usually a good idea - you have no guarantee that the new lo point will be before the new hi point in the source text due to macro expansion. In general, I would say just never do this - you have to put up with the spans you have. in the future, we should have more spans plus we'll provide infrastructure to concat them. In the meantime, if you must do this then you need to check that the span you create is valid. I'm also not sure about re-using the expansion id, given that the rest of the expression might have a different expansion history, it doesn't make a lot of sense. Seeing as this span should just be used for error messages, you can probably just use the 'no expansion' id. |
Part of #35233.
Extension of #35191.
r? @GuillaumeGomez