mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 03:54:42 +00:00 
			
		
		
		
	Salsify the crate graph
I.e. make it not one giant input but multiple, for incrementality and decreased memory usage for Salsa 3 reasons.
This commit is contained in:
		
							parent
							
								
									44f18c3d05
								
							
						
					
					
						commit
						c94e9efbef
					
				
					 108 changed files with 3630 additions and 2512 deletions
				
			
		|  | @ -626,11 +626,11 @@ impl<'db, 'sema> Matcher<'db, 'sema> { | |||
|                 match_error!("Failed to get receiver type for `{}`", expr.syntax().text()) | ||||
|             })? | ||||
|             .original; | ||||
|         let krate = self.sema.scope(expr.syntax()).map(|it| it.krate()).unwrap_or_else(|| { | ||||
|             hir::Crate::from( | ||||
|                 *self.sema.db.crate_graph().crates_in_topological_order().last().unwrap(), | ||||
|             ) | ||||
|         }); | ||||
|         let krate = self | ||||
|             .sema | ||||
|             .scope(expr.syntax()) | ||||
|             .map(|it| it.krate()) | ||||
|             .unwrap_or_else(|| hir::Crate::from(*self.sema.db.all_crates().last().unwrap())); | ||||
|         let res = code_type | ||||
|             .autoderef(self.sema.db) | ||||
|             .enumerate() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Chayim Refael Friedman
						Chayim Refael Friedman