mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 12:04:43 +00:00 
			
		
		
		
	Make higher levels adapt Bodys exprs having ExprOrPatId values
This commit is contained in:
		
							parent
							
								
									06097c3388
								
							
						
					
					
						commit
						d8779b4a0e
					
				
					 8 changed files with 32 additions and 33 deletions
				
			
		|  | @ -142,7 +142,7 @@ impl SourceAnalyzer { | |||
|     fn pat_id(&self, pat: &ast::Pat) -> Option<PatId> { | ||||
|         // FIXME: macros, see `expr_id`
 | ||||
|         let src = InFile { file_id: self.file_id, value: pat }; | ||||
|         self.body_source_map()?.node_pat(src) | ||||
|         self.body_source_map()?.node_pat(src).and_then(ExprOrPatId::as_pat) | ||||
|     } | ||||
| 
 | ||||
|     fn binding_id_of_pat(&self, pat: &ast::IdentPat) -> Option<BindingId> { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ali Bektas
						Ali Bektas