[Feat]: Make it possible to use AstPathSegment
and Ident
as an emission node
#275
Labels
Milestone
AstPathSegment
and Ident
as an emission node
#275
Summary
I tried to update my
ToStringOnCowStr
lint to0.3.0
, but I couldn't make it work seamlessly as I wanted.Here is the code that I have and I want to focus on:
And here is the full code for more context:
Details
I couldn't just write this:
or this:
because neither
AstPathSegment
norIdent
implementEmissionNode
. If I just usemethod
then the span used in the error message is this:But what I want it to be is this:
Intuitively I wanted to use the method name with the generics included (
AstPathSegment
) or at least the method's identifier as the span, but I couldn't, so I had to manually override the span.The text was updated successfully, but these errors were encountered: