rust-analyzer
rust-analyzer copied to clipboard
Panic in nightly: 'can't resolve local ptr to SyntaxNode: SyntaxNodePtr { range: 8652..8667, kind: METHOD_CALL_EXPR }
Using neovim with nightly rust and rust-analyzer-preview:
rustc 1.58.0-nightly (baba6687d 2021-11-03)
rust-analyzer 04f03a3 2021-11-03 dev
I don't have a minimal reproduction yet (or public code), but the error happens when I move the cursor to the function name in the following function definition (and similarly for some other functions too).
pub fn components(&self) -> impl Iterator<Item = &'static char> {
self.components.iter()
}
Judging from the backtrace the panic is caused here https://github.com/rust-analyzer/rust-analyzer/blob/962be380042c04d195d9c120d8445e8039d340ee/crates/ide_assists/src/handlers/inline_call.rs#L118
This needs a reproduction to be fixable unfortunately
-32603: request handler panicked: can't resolve local ptr to SyntaxNode: SyntaxNodePtr { kind: CALL_EXPR, range: 8..32 }
code: https://github.com/pacak/bpaf/tree/bug-repro
while trying to inline word_arg in src/arg.rs into all callers
Not quite minimized but shouldn't have external dependencies.
Worked around in #16678.