mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-11-03 13:13:18 +00:00 
			
		
		
		
	fix: using name(include) instead of str
This commit is contained in:
		
							parent
							
								
									740a864b7c
								
							
						
					
					
						commit
						b76f2c8ee0
					
				@ -12,11 +12,15 @@ use syntax::{
 | 
				
			|||||||
use triomphe::Arc;
 | 
					use triomphe::Arc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use crate::{
 | 
					use crate::{
 | 
				
			||||||
    ast_id_map::AstIdMap, builtin_attr_macro::pseudo_derive_attr_expansion,
 | 
					    ast_id_map::AstIdMap,
 | 
				
			||||||
    builtin_fn_macro::EagerExpander, fixup, hygiene::HygieneFrame, tt, AstId, BuiltinAttrExpander,
 | 
					    builtin_attr_macro::pseudo_derive_attr_expansion,
 | 
				
			||||||
    BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallInfo, ExpandError, ExpandResult,
 | 
					    builtin_fn_macro::EagerExpander,
 | 
				
			||||||
    ExpandTo, HirFileId, HirFileIdRepr, MacroCallId, MacroCallKind, MacroCallLoc, MacroDefId,
 | 
					    fixup,
 | 
				
			||||||
    MacroDefKind, MacroFile, ProcMacroExpander,
 | 
					    hygiene::HygieneFrame,
 | 
				
			||||||
 | 
					    name::{name, AsName},
 | 
				
			||||||
 | 
					    tt, AstId, BuiltinAttrExpander, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallInfo,
 | 
				
			||||||
 | 
					    ExpandError, ExpandResult, ExpandTo, HirFileId, HirFileIdRepr, MacroCallId, MacroCallKind,
 | 
				
			||||||
 | 
					    MacroCallLoc, MacroDefId, MacroDefKind, MacroFile, ProcMacroExpander,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Total limit on the number of tokens produced by any macro invocation.
 | 
					/// Total limit on the number of tokens produced by any macro invocation.
 | 
				
			||||||
@ -620,7 +624,7 @@ fn macro_expand(db: &dyn ExpandDatabase, id: MacroCallId) -> ExpandResult<Arc<tt
 | 
				
			|||||||
            if let Some(name_ref) =
 | 
					            if let Some(name_ref) =
 | 
				
			||||||
                ast_id.to_node(db).path().and_then(|p| p.segment()).and_then(|s| s.name_ref())
 | 
					                ast_id.to_node(db).path().and_then(|p| p.segment()).and_then(|s| s.name_ref())
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                name_ref.text() == "include"
 | 
					                name_ref.as_name() == name!(include)
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
                false
 | 
					                false
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user