File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
crates/ra_ide_api/src/display Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 1
1
-- -
2
- created : " 2019-05-23T22:23:35.168422050Z "
2
+ created : " 2019-06-28T20:46:18.274464142Z "
3
3
creator : insta @0.8 .1
4
4
source : crates / ra_ide_api / src / display / structure .rs
5
5
expression : structure
@@ -157,11 +157,20 @@ expression: structure
157
157
detail : None ,
158
158
deprecated : false ,
159
159
},
160
+ StructureNode {
161
+ parent: None ,
162
+ label: " mc" ,
163
+ navigation_range: [284 ; 286 ),
164
+ node_range : [271 ; 303 ),
165
+ kind : MACRO_CALL ,
166
+ detail : None ,
167
+ deprecated : false ,
168
+ },
160
169
StructureNode {
161
170
parent: None ,
162
171
label: " obsolete" ,
163
- navigation_range: [288 ; 296 ),
164
- node_range : [271 ; 301 ),
172
+ navigation_range: [322 ; 330 ),
173
+ node_range : [305 ; 335 ),
165
174
kind : FN_DEF ,
166
175
detail : Some (
167
176
" fn()" ,
@@ -171,8 +180,8 @@ expression: structure
171
180
StructureNode {
172
181
parent: None ,
173
182
label: " very_obsolete" ,
174
- navigation_range: [341 ; 354 ),
175
- node_range : [303 ; 359 ),
183
+ navigation_range: [375 ; 388 ),
184
+ node_range : [337 ; 393 ),
176
185
kind : FN_DEF ,
177
186
detail : Some (
178
187
" fn()" ,
Original file line number Diff line number Diff line change @@ -142,6 +142,13 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
142
142
} ;
143
143
Some ( node)
144
144
} )
145
+ . visit ( |mc : & ast:: MacroCall | {
146
+ let first_token = mc. syntax ( ) . first_token ( ) . unwrap ( ) ;
147
+ if first_token. text ( ) . as_str ( ) != "macro_rules" {
148
+ return None ;
149
+ }
150
+ decl ( mc)
151
+ } )
145
152
. accept ( node) ?
146
153
}
147
154
@@ -177,6 +184,10 @@ impl E {}
177
184
178
185
impl fmt::Debug for E {}
179
186
187
+ macro_rules! mc {
188
+ () => {}
189
+ }
190
+
180
191
#[deprecated]
181
192
fn obsolete() {}
182
193
You can’t perform that action at this time.
0 commit comments