mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2026-03-12 20:00:31 +00:00
add comment on incrementality of subrequest
This commit is contained in:
parent
f8e5c666d3
commit
2ef2aedebd
@ -553,6 +553,7 @@ impl ProcMacroExpander for Expander {
|
||||
|
||||
Ok(SubResponse::LocalFilePathResult { name })
|
||||
}
|
||||
// Not incremental: requires full file text.
|
||||
SubRequest::SourceText { file_id, ast_id, start, end } => {
|
||||
let range = resolve_sub_span(
|
||||
db,
|
||||
@ -567,6 +568,7 @@ impl ProcMacroExpander for Expander {
|
||||
|
||||
Ok(SubResponse::SourceTextResult { text })
|
||||
}
|
||||
// Not incremental: requires building line index.
|
||||
SubRequest::LineColumn { file_id, ast_id, offset } => {
|
||||
let range =
|
||||
resolve_sub_span(db, file_id, ast_id, TextRange::empty(TextSize::from(offset)));
|
||||
@ -591,6 +593,7 @@ impl ProcMacroExpander for Expander {
|
||||
|
||||
Ok(SubResponse::FilePathResult { name })
|
||||
}
|
||||
// Not incremental: requires global span resolution.
|
||||
SubRequest::ByteRange { file_id, ast_id, start, end } => {
|
||||
let range = resolve_sub_span(
|
||||
db,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user