-
Notifications
You must be signed in to change notification settings - Fork 7
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
parse_item
panics when given an incomplete impl trait block
#59
Comments
I'd honestly say this is a problem with RA and not this macro? If the block is invalid, then it shouldn't be fed to venial in the first place. Making venial resilient to parsing errors would be a pretty deep change, much deeper than I'm willing to do. |
This was the upstream rust-analyzer bug. rust-lang/rust-analyzer#10468 (comment) But I thought it got fixed as part of rust-lang/rust-analyzer#11014. Is the repro here really an attribute macro or were you using venial from a bang macro? |
Wasn't expecting to see a reply from you. Out of curiosity, how did you get pinged about this? |
It sometimes works but very unreliably when the attribute macro panics. I've got it to autocomplete a function name, but also sometimes it just doesn't work at all. i'll see if i can make a smaller repro since i've been using a much bigger more complicated attribute macro, however the panic is what it complained about. |
If you try to use
parse_item
on an impl trait block like this:Then venial will panic because of a call to
Option::unwrap
. I believe it is this call specifically.This is a problem as a proc-macro panicking like this prevents RA from reliably autocompleting the code.
The text was updated successfully, but these errors were encountered: