File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ impl Files {
8686 let files = Arc :: clone ( & self . files ) ;
8787 match files. entry ( file_id) {
8888 Entry :: Occupied ( mut occupied) => {
89- occupied. get_mut ( ) . set_text ( db) . to ( Arc :: from ( text) ) ;
89+ occupied. get_mut ( ) . set_text ( db) . with_durability ( durability ) . to ( Arc :: from ( text) ) ;
9090 }
9191 Entry :: Vacant ( vacant) => {
9292 let text =
@@ -116,7 +116,7 @@ impl Files {
116116 let source_roots = Arc :: clone ( & self . source_roots ) ;
117117 match source_roots. entry ( source_root_id) {
118118 Entry :: Occupied ( mut occupied) => {
119- occupied. get_mut ( ) . set_source_root ( db) . to ( source_root) ;
119+ occupied. get_mut ( ) . set_source_root ( db) . with_durability ( durability ) . to ( source_root) ;
120120 }
121121 Entry :: Vacant ( vacant) => {
122122 let source_root =
@@ -145,7 +145,11 @@ impl Files {
145145 // let db = self;
146146 match file_source_roots. entry ( id) {
147147 Entry :: Occupied ( mut occupied) => {
148- occupied. get_mut ( ) . set_source_root_id ( db) . to ( source_root_id) ;
148+ occupied
149+ . get_mut ( )
150+ . set_source_root_id ( db)
151+ . with_durability ( durability)
152+ . to ( source_root_id) ;
149153 }
150154 Entry :: Vacant ( vacant) => {
151155 let file_source_root =
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ pub trait ExpandDatabase: RootQueryDb {
6161 #[ salsa:: input]
6262 fn proc_macros ( & self ) -> Arc < ProcMacros > ;
6363
64+ /// Incrementality query to prevent queries from directly depending on `ExpandDatabase::proc_macros`.
6465 #[ salsa:: invoke_actual( crate :: proc_macro:: proc_macros_for_crate) ]
6566 fn proc_macros_for_crate ( & self , krate : Crate ) -> Option < Arc < CrateProcMacros > > ;
6667
You can’t perform that action at this time.
0 commit comments