Closed blorbb closed 2 weeks ago
Thank you for reporting and investigating this, it seems rust analyzer has changed it's behavior here, this used to work fine.
Your solution looks like a reasonable workaround, I'll see to release a new version asap.
Your PR is included in the v0.5.1 release. Thank you for your contribution.
Issue: using the nightly
import_style!
macro runs fine with rustc but panics in rust-analyzer.Even adding the following to
.vscode/settings.json
does not prevent the error message for some reason.The panic comes from the source file being
SourceFile { path: "", is_real: true }
when run by rust-analyzer. I added a check to see if there is no parent, and simply expand to nothing. This prevents auto-complete, but rustc errors/warnings about non-existent/unused values still works.