aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r--crates/ra_analysis/src/lib.rs22
1 files changed, 6 insertions, 16 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index c0e43544e..012d36b8e 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -19,8 +19,6 @@ macro_rules! ctry {
19} 19}
20 20
21mod arena; 21mod arena;
22mod syntax_ptr;
23mod input;
24mod db; 22mod db;
25mod loc2id; 23mod loc2id;
26mod imp; 24mod imp;
@@ -32,35 +30,27 @@ pub mod mock_analysis;
32use std::{fmt, sync::Arc}; 30use std::{fmt, sync::Arc};
33 31
34use ra_syntax::{AtomEdit, SourceFileNode, TextRange, TextUnit}; 32use ra_syntax::{AtomEdit, SourceFileNode, TextRange, TextUnit};
33use ra_db::FileResolverImp;
35use rayon::prelude::*; 34use rayon::prelude::*;
36use relative_path::RelativePathBuf; 35use relative_path::RelativePathBuf;
37 36
38use crate::{ 37use crate::{
39 imp::{AnalysisHostImpl, AnalysisImpl, FileResolverImp}, 38 imp::{AnalysisHostImpl, AnalysisImpl},
40 symbol_index::SymbolIndex, 39 symbol_index::SymbolIndex,
41}; 40};
42 41
43pub use crate::{ 42pub use crate::{
44 completion::CompletionItem, 43 completion::CompletionItem,
45 hir::FnSignatureInfo, 44 hir::FnSignatureInfo,
46 input::{CrateGraph, CrateId, FileId, FileResolver},
47}; 45};
48pub use ra_editor::{ 46pub use ra_editor::{
49 FileSymbol, Fold, FoldKind, HighlightedRange, LineIndex, Runnable, RunnableKind, StructureNode, 47 FileSymbol, Fold, FoldKind, HighlightedRange, LineIndex, Runnable, RunnableKind, StructureNode,
50}; 48};
51 49
52#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] 50pub use ra_db::{
53pub struct Canceled; 51 Canceled, Cancelable,
54 52 CrateGraph, CrateId, FileId, FileResolver
55pub type Cancelable<T> = Result<T, Canceled>; 53};
56
57impl std::fmt::Display for Canceled {
58 fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
59 fmt.write_str("Canceled")
60 }
61}
62
63impl std::error::Error for Canceled {}
64 54
65#[derive(Default)] 55#[derive(Default)]
66pub struct AnalysisChange { 56pub struct AnalysisChange {