mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 12:04:43 +00:00 
			
		
		
		
	When renaming a parameter to self, change callers to use method call syntax
				
					
				
			This commit is contained in:
		
							parent
							
								
									68e7ec90bf
								
							
						
					
					
						commit
						74ecb1e788
					
				
					 11 changed files with 186 additions and 25 deletions
				
			
		|  | @ -890,7 +890,7 @@ fn include_str_expand( | |||
|     }; | ||||
| 
 | ||||
|     let text = db.file_text(file_id.file_id(db)); | ||||
|     let text = &*text.text(db); | ||||
|     let text = &**text.text(db); | ||||
| 
 | ||||
|     ExpandResult::ok(quote!(call_site =>#text)) | ||||
| } | ||||
|  |  | |||
|  | @ -99,6 +99,16 @@ impl FileRange { | |||
|     pub fn into_file_id(self, db: &dyn ExpandDatabase) -> FileRangeWrapper<FileId> { | ||||
|         FileRangeWrapper { file_id: self.file_id.file_id(db), range: self.range } | ||||
|     } | ||||
| 
 | ||||
|     #[inline] | ||||
|     pub fn file_text(self, db: &dyn ExpandDatabase) -> &triomphe::Arc<str> { | ||||
|         db.file_text(self.file_id.file_id(db)).text(db) | ||||
|     } | ||||
| 
 | ||||
|     #[inline] | ||||
|     pub fn text(self, db: &dyn ExpandDatabase) -> &str { | ||||
|         &self.file_text(db)[self.range] | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| /// `AstId` points to an AST node in any file.
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Chayim Refael Friedman
						Chayim Refael Friedman