File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
ide/src/syntax_highlighting/test_data Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 56
56
< span class ="keyword "> pub</ span > < span class ="keyword "> trait</ span > < span class ="trait declaration public "> Fn</ span > < span class ="angle "> <</ span > < span class ="type_param declaration "> Args</ span > < span class ="angle "> ></ span > < span class ="colon "> :</ span > < span class ="trait public "> FnMut</ span > < span class ="angle "> <</ span > < span class ="type_param "> Args</ span > < span class ="angle "> ></ span > < span class ="brace "> {</ span > < span class ="brace "> }</ span >
57
57
< span class ="brace "> }</ span >
58
58
59
- < span class ="module crate_root library "> proc_macros</ span > < span class ="operator "> ::</ span > < span class ="function library "> mirror</ span > < span class ="macro_bang "> !</ span > < span class ="brace "> {</ span >
59
+ < span class ="module crate_root library "> proc_macros</ span > < span class ="operator "> ::</ span > < span class ="macro library "> mirror</ span > < span class ="macro_bang "> !</ span > < span class ="brace "> {</ span >
60
60
< span class ="brace "> {</ span >
61
61
< span class ="comma "> ,</ span > < span class ="builtin_type "> i32</ span > < span class ="colon "> :</ span > < span class ="field declaration public "> x</ span > < span class ="keyword "> pub</ span >
62
62
< span class ="comma "> ,</ span > < span class ="builtin_type "> i32</ span > < span class ="colon "> :</ span > < span class ="field declaration public "> y</ span > < span class ="keyword "> pub</ span >
Original file line number Diff line number Diff line change @@ -416,10 +416,10 @@ impl NameRefClass {
416
416
}
417
417
418
418
if let Some ( path) = ast:: PathSegment :: cast ( parent. clone ( ) ) . map ( |it| it. parent_path ( ) ) {
419
- if path. qualifier ( ) . is_none ( ) {
419
+ if path. parent_path ( ) . is_none ( ) {
420
420
if let Some ( macro_call) = path. syntax ( ) . parent ( ) . and_then ( ast:: MacroCall :: cast) {
421
- // Only use this to resolve single-segment macro calls like `foo!()`. Multi-segment
422
- // paths are handled below (allowing `log$0::info!` to resolve to the log crate) .
421
+ // Only use this to resolve to macro calls for last segments as qualifiers resolve
422
+ // to modules below .
423
423
if let Some ( macro_def) = sema. resolve_macro_call ( & macro_call) {
424
424
return Some ( NameRefClass :: Definition ( Definition :: Macro ( macro_def) ) ) ;
425
425
}
You can’t perform that action at this time.
0 commit comments