mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-30 19:49:36 +00:00 
			
		
		
		
	cargo fmt
This commit is contained in:
		
							parent
							
								
									87f837cec7
								
							
						
					
					
						commit
						7535bb4661
					
				
					 571 changed files with 2210 additions and 2458 deletions
				
			
		|  | @ -16,7 +16,7 @@ use std::{ | |||
| 
 | ||||
| use rowan::TextRange; | ||||
| 
 | ||||
| use crate::{syntax_node::RustLanguage, AstNode, SyntaxNode}; | ||||
| use crate::{AstNode, SyntaxNode, syntax_node::RustLanguage}; | ||||
| 
 | ||||
| /// A "pointer" to a [`SyntaxNode`], via location in the source code.
 | ||||
| pub type SyntaxNodePtr = rowan::ast::SyntaxNodePtr<RustLanguage>; | ||||
|  | @ -118,7 +118,7 @@ impl<N: AstNode> From<AstPtr<N>> for SyntaxNodePtr { | |||
| 
 | ||||
| #[test] | ||||
| fn test_local_syntax_ptr() { | ||||
|     use crate::{ast, AstNode, SourceFile}; | ||||
|     use crate::{AstNode, SourceFile, ast}; | ||||
| 
 | ||||
|     let file = SourceFile::parse("struct Foo { f: u32, }", parser::Edition::CURRENT).ok().unwrap(); | ||||
|     let field = file.syntax().descendants().find_map(ast::RecordField::cast).unwrap(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 BenjaminBrienen
						BenjaminBrienen