-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-assistsS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
It originated on vscode if it means anything.
Sorry, I don't really have anything besides that. The line in question:
let res = adut!(engine, )
^~~~~~The adut macro is as follows:
macro_rules! adut {
($engine: ident, $id: expr, $msg: expr) => {
$engine.tick($id, Message::Adut($msg))
};
}Here's the error message that rust-analyzer showed:
[ERROR ide_assists::handlers::extract_function] body references two different self params
Panic context:
>
version: 996300f4a 2021-08-23 stable
request: textDocument/completion CompletionParams {
text_document_position: TextDocumentPositionParams {
text_document: TextDocumentIdentifier {
uri: Url {
scheme: "file",
cannot_be_a_base: false,
username: "",
password: None,
host: None,
port: None,
path: "..file.rs",
query: None,
fragment: None,
},
},
position: Position {
line: 60,
character: 25,
},
},
work_done_progress_params: WorkDoneProgressParams {
work_done_token: None,
},
partial_result_params: PartialResultParams {
partial_result_token: None,
},
context: Some(
CompletionContext {
trigger_kind: Invoked,
trigger_character: None,
},
),
}
thread '<unnamed>' panicked at 'Bad range: node range 0..8, range 0..15', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/rowan-0.13.0-pre.8/src/cursor.rs:791:13
stack backtrace:
0: rust_begin_unwind
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
1: std::panicking::begin_panic_fmt
at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:457:5
2: rowan::cursor::SyntaxNode::covering_element
3: ide_completion::patterns::find_node_with_range
4: ide_completion::patterns::determine_location
5: ide_completion::context::CompletionContext::fill
6: ide_completion::context::CompletionContext::new
7: ide_completion::completions
8: std::panicking::try
9: rust_analyzer::handlers::handle_completion
10: rust_analyzer::dispatch::RequestDispatcher::on::{{closure}}::{{closure}}
11: <F as threadpool::FnBox>::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Error - 11:48:50 PM] Request textDocument/completion failed.
Message: server panicked: Bad range: node range 0..8, range 0..15
Code: -32603
No idea comes to mind.
Metadata
Metadata
Assignees
Labels
A-assistsS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now