aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/global_state.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-05-17 18:07:10 +0100
committerJonas Schievink <[email protected]>2021-05-27 14:05:41 +0100
commit33debc40654be9e9061c53784f6c762b2fd21eba (patch)
treedef63d3cc42fe48b1dfdf716c2e8e56de5324dab /crates/rust-analyzer/src/global_state.rs
parentd0a4ba294ccf0c925a5ff1115c19a60c6a24b734 (diff)
Update salsa
Diffstat (limited to 'crates/rust-analyzer/src/global_state.rs')
-rw-r--r--crates/rust-analyzer/src/global_state.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs
index 6a36d29d4..ea9dbf7fc 100644
--- a/crates/rust-analyzer/src/global_state.rs
+++ b/crates/rust-analyzer/src/global_state.rs
@@ -7,7 +7,7 @@ use std::{sync::Arc, time::Instant};
7 7
8use crossbeam_channel::{unbounded, Receiver, Sender}; 8use crossbeam_channel::{unbounded, Receiver, Sender};
9use flycheck::FlycheckHandle; 9use flycheck::FlycheckHandle;
10use ide::{Analysis, AnalysisHost, Cancelable, Change, FileId}; 10use ide::{Analysis, AnalysisHost, Cancellable, Change, FileId};
11use ide_db::base_db::{CrateId, VfsPath}; 11use ide_db::base_db::{CrateId, VfsPath};
12use lsp_types::{SemanticTokens, Url}; 12use lsp_types::{SemanticTokens, Url};
13use parking_lot::{Mutex, RwLock}; 13use parking_lot::{Mutex, RwLock};
@@ -280,7 +280,7 @@ impl GlobalStateSnapshot {
280 file_id_to_url(&self.vfs.read().0, id) 280 file_id_to_url(&self.vfs.read().0, id)
281 } 281 }
282 282
283 pub(crate) fn file_line_index(&self, file_id: FileId) -> Cancelable<LineIndex> { 283 pub(crate) fn file_line_index(&self, file_id: FileId) -> Cancellable<LineIndex> {
284 let endings = self.vfs.read().1[&file_id]; 284 let endings = self.vfs.read().1[&file_id];
285 let index = self.analysis.file_line_index(file_id)?; 285 let index = self.analysis.file_line_index(file_id)?;
286 let res = LineIndex { index, endings, encoding: self.config.offset_encoding() }; 286 let res = LineIndex { index, endings, encoding: self.config.offset_encoding() };