@@ -5,8 +5,8 @@ mod input;
5
5
6
6
use std:: panic;
7
7
8
+ use ra_salsa:: Durability ;
8
9
use rustc_hash:: FxHashMap ;
9
- use salsa:: Durability ;
10
10
use span:: EditionedFileId ;
11
11
use syntax:: { ast, Parse , SourceFile , SyntaxError } ;
12
12
use triomphe:: Arc ;
@@ -20,19 +20,19 @@ pub use crate::{
20
20
TargetLayoutLoadResult ,
21
21
} ,
22
22
} ;
23
- pub use salsa :: { self , Cancelled } ;
23
+ pub use ra_salsa :: { self , Cancelled } ;
24
24
pub use vfs:: { file_set:: FileSet , AnchoredPath , AnchoredPathBuf , VfsPath } ;
25
25
26
26
pub use semver:: { BuildMetadata , Prerelease , Version , VersionReq } ;
27
27
28
28
#[ macro_export]
29
29
macro_rules! impl_intern_key {
30
30
( $name: ident) => {
31
- impl $crate:: salsa :: InternKey for $name {
32
- fn from_intern_id( v: $crate:: salsa :: InternId ) -> Self {
31
+ impl $crate:: ra_salsa :: InternKey for $name {
32
+ fn from_intern_id( v: $crate:: ra_salsa :: InternId ) -> Self {
33
33
$name( v)
34
34
}
35
- fn as_intern_id( & self ) -> $crate:: salsa :: InternId {
35
+ fn as_intern_id( & self ) -> $crate:: ra_salsa :: InternId {
36
36
self . 0
37
37
}
38
38
}
@@ -55,30 +55,30 @@ pub trait FileLoader {
55
55
56
56
/// Database which stores all significant input facts: source code and project
57
57
/// model. Everything else in rust-analyzer is derived from these queries.
58
- #[ salsa :: query_group( SourceDatabaseStorage ) ]
58
+ #[ ra_salsa :: query_group( SourceDatabaseStorage ) ]
59
59
pub trait SourceDatabase : FileLoader + std:: fmt:: Debug {
60
- #[ salsa :: input]
60
+ #[ ra_salsa :: input]
61
61
fn compressed_file_text ( & self , file_id : FileId ) -> Arc < [ u8 ] > ;
62
62
63
63
/// Text of the file.
64
- #[ salsa :: lru]
64
+ #[ ra_salsa :: lru]
65
65
fn file_text ( & self , file_id : FileId ) -> Arc < str > ;
66
66
67
67
/// Parses the file into the syntax tree.
68
- #[ salsa :: lru]
68
+ #[ ra_salsa :: lru]
69
69
fn parse ( & self , file_id : EditionedFileId ) -> Parse < ast:: SourceFile > ;
70
70
71
71
/// Returns the set of errors obtained from parsing the file including validation errors.
72
72
fn parse_errors ( & self , file_id : EditionedFileId ) -> Option < Arc < [ SyntaxError ] > > ;
73
73
74
74
/// The crate graph.
75
- #[ salsa :: input]
75
+ #[ ra_salsa :: input]
76
76
fn crate_graph ( & self ) -> Arc < CrateGraph > ;
77
77
78
- #[ salsa :: input]
78
+ #[ ra_salsa :: input]
79
79
fn crate_workspace_data ( & self ) -> Arc < FxHashMap < CrateId , Arc < CrateWorkspaceData > > > ;
80
80
81
- #[ salsa :: transparent]
81
+ #[ ra_salsa :: transparent]
82
82
fn toolchain_channel ( & self , krate : CrateId ) -> Option < ReleaseChannel > ;
83
83
}
84
84
@@ -126,14 +126,14 @@ fn file_text(db: &dyn SourceDatabase, file_id: FileId) -> Arc<str> {
126
126
127
127
/// We don't want to give HIR knowledge of source roots, hence we extract these
128
128
/// methods into a separate DB.
129
- #[ salsa :: query_group( SourceRootDatabaseStorage ) ]
129
+ #[ ra_salsa :: query_group( SourceRootDatabaseStorage ) ]
130
130
pub trait SourceRootDatabase : SourceDatabase {
131
131
/// Path to a file, relative to the root of its source root.
132
132
/// Source root of the file.
133
- #[ salsa :: input]
133
+ #[ ra_salsa :: input]
134
134
fn file_source_root ( & self , file_id : FileId ) -> SourceRootId ;
135
135
/// Contents of the source root.
136
- #[ salsa :: input]
136
+ #[ ra_salsa :: input]
137
137
fn source_root ( & self , id : SourceRootId ) -> Arc < SourceRoot > ;
138
138
139
139
/// Crates whose root fool is in `id`.
0 commit comments