@@ -15,7 +15,7 @@ use hir::ChangeWithProcMacros;
1515use ide:: { Analysis , AnalysisHost , Cancellable , FileId , SourceRootId } ;
1616use ide_db:: {
1717 MiniCore ,
18- base_db:: { Crate , ProcMacroPaths , SourceDatabase } ,
18+ base_db:: { Crate , ProcMacroPaths , SourceDatabase , salsa :: Revision } ,
1919} ;
2020use itertools:: Itertools ;
2121use load_cargo:: SourceRootConfig ;
@@ -194,12 +194,13 @@ pub(crate) struct GlobalState {
194194 pub ( crate ) incomplete_crate_graph : bool ,
195195
196196 pub ( crate ) minicore : MiniCoreRustAnalyzerInternalOnly ,
197+ pub ( crate ) last_gc_revision : Revision ,
197198}
198199
199200// FIXME: This should move to the VFS once the rewrite is done.
200201#[ derive( Debug , Clone , Default ) ]
201202pub ( crate ) struct MiniCoreRustAnalyzerInternalOnly {
202- pub ( crate ) minicore_text : Option < String > ,
203+ pub ( crate ) minicore_text : Option < Arc < str > > ,
203204}
204205
205206/// An immutable snapshot of the world's state at a point in time.
@@ -256,6 +257,8 @@ impl GlobalState {
256257
257258 let ( discover_sender, discover_receiver) = unbounded ( ) ;
258259
260+ let last_gc_revision = analysis_host. raw_database ( ) . nonce_and_revision ( ) . 1 ;
261+
259262 let mut this = GlobalState {
260263 sender,
261264 req_queue : ReqQueue :: default ( ) ,
@@ -319,6 +322,7 @@ impl GlobalState {
319322 incomplete_crate_graph : false ,
320323
321324 minicore : MiniCoreRustAnalyzerInternalOnly :: default ( ) ,
325+ last_gc_revision,
322326 } ;
323327 // Apply any required database inputs from the config.
324328 this. update_configuration ( config) ;
0 commit comments