mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 03:54:42 +00:00 
			
		
		
		
	refactor: De-arc lang item queries
This commit is contained in:
		
							parent
							
								
									5adee2ad2c
								
							
						
					
					
						commit
						6355df9c57
					
				
					 23 changed files with 194 additions and 261 deletions
				
			
		|  | @ -482,9 +482,8 @@ struct FilterMapNextChecker { | |||
| impl FilterMapNextChecker { | ||||
|     fn new(resolver: &hir_def::resolver::Resolver, db: &dyn HirDatabase) -> Self { | ||||
|         // Find and store the FunctionIds for Iterator::filter_map and Iterator::next
 | ||||
|         let (next_function_id, filter_map_function_id) = match db | ||||
|             .lang_item(resolver.krate(), LangItem::IteratorNext) | ||||
|             .and_then(|it| it.as_function()) | ||||
|         let (next_function_id, filter_map_function_id) = match LangItem::IteratorNext | ||||
|             .resolve_function(db, resolver.krate()) | ||||
|         { | ||||
|             Some(next_function_id) => ( | ||||
|                 Some(next_function_id), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Wirth
						Lukas Wirth