@@ -3,14 +3,16 @@ mod generated;
3
3
use expect_test:: expect;
4
4
use hir:: Semantics ;
5
5
use ide_db:: {
6
- base_db:: { fixture:: WithFixture , FileId , FileRange , SourceDatabaseExt } ,
6
+ base_db:: { fixture:: WithFixture , salsa :: Durability , FileId , FileRange , SourceDatabaseExt } ,
7
7
helpers:: {
8
8
insert_use:: { InsertUseConfig , MergeBehavior } ,
9
9
SnippetCap ,
10
10
} ,
11
11
source_change:: FileSystemEdit ,
12
12
RootDatabase ,
13
13
} ;
14
+ use rustc_hash:: FxHashSet ;
15
+ use std:: sync:: Arc ;
14
16
use stdx:: { format_to, trim_indent} ;
15
17
use syntax:: TextRange ;
16
18
use test_utils:: { assert_eq_text, extract_offset} ;
@@ -101,7 +103,12 @@ enum ExpectedResult<'a> {
101
103
102
104
#[ track_caller]
103
105
fn check ( handler : Handler , before : & str , expected : ExpectedResult , assist_label : Option < & str > ) {
104
- let ( db, file_with_caret_id, range_or_offset) = RootDatabase :: with_range_or_offset ( before) ;
106
+ use ide_db:: symbol_index:: SymbolsDatabase ;
107
+ let ( mut db, file_with_caret_id, range_or_offset) = RootDatabase :: with_range_or_offset ( before) ;
108
+ let mut local_roots = FxHashSet :: default ( ) ;
109
+ local_roots. insert ( ide_db:: base_db:: fixture:: WORKSPACE ) ;
110
+ db. set_local_roots_with_durability ( Arc :: new ( local_roots) , Durability :: HIGH ) ;
111
+
105
112
let text_without_caret = db. file_text ( file_with_caret_id) . to_string ( ) ;
106
113
107
114
let frange = FileRange { file_id : file_with_caret_id, range : range_or_offset. into ( ) } ;
0 commit comments