@@ -14,7 +14,7 @@ use base_db::FileId;
14
14
use hir:: { ItemInNs , MacroDef , ModuleDef , Name , PathResolution , Semantics } ;
15
15
use itertools:: Itertools ;
16
16
use syntax:: {
17
- ast:: { self , make, HasLoopBody , Ident } ,
17
+ ast:: { self , make, HasLoopBody } ,
18
18
AstNode , AstToken , Direction , SyntaxElement , SyntaxKind , SyntaxToken , TokenAtOffset , WalkEvent ,
19
19
T ,
20
20
} ;
@@ -38,7 +38,7 @@ pub fn item_name(db: &RootDatabase, item: ItemInNs) -> Option<Name> {
38
38
pub fn get_path_in_derive_attr (
39
39
sema : & hir:: Semantics < RootDatabase > ,
40
40
attr : & ast:: Attr ,
41
- cursor : & Ident ,
41
+ cursor : & ast :: Ident ,
42
42
) -> Option < ast:: Path > {
43
43
let path = attr. path ( ) ?;
44
44
let tt = attr. token_tree ( ) ?;
@@ -55,7 +55,7 @@ pub fn get_path_in_derive_attr(
55
55
}
56
56
57
57
/// Parses the path the identifier is part of inside a token tree.
58
- pub fn get_path_at_cursor_in_tt ( cursor : & Ident ) -> Option < ast:: Path > {
58
+ pub fn get_path_at_cursor_in_tt ( cursor : & ast :: Ident ) -> Option < ast:: Path > {
59
59
let cursor = cursor. syntax ( ) ;
60
60
let first = cursor
61
61
. siblings_with_tokens ( Direction :: Prev )
@@ -75,7 +75,7 @@ pub fn get_path_at_cursor_in_tt(cursor: &Ident) -> Option<ast::Path> {
75
75
pub fn try_resolve_derive_input (
76
76
sema : & hir:: Semantics < RootDatabase > ,
77
77
attr : & ast:: Attr ,
78
- cursor : & Ident ,
78
+ cursor : & ast :: Ident ,
79
79
) -> Option < PathResolution > {
80
80
let path = get_path_in_derive_attr ( sema, attr, cursor) ?;
81
81
let scope = sema. scope ( attr. syntax ( ) ) ;
0 commit comments