File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -1234,6 +1234,37 @@ fn f() { fo$0o!(); }
1234
1234
)
1235
1235
}
1236
1236
1237
+ #[ test]
1238
+ fn test_hover_macro2_invocation ( ) {
1239
+ check (
1240
+ r#"
1241
+ /// foo bar
1242
+ ///
1243
+ /// foo bar baz
1244
+ macro foo() {}
1245
+
1246
+ fn f() { fo$0o!(); }
1247
+ "# ,
1248
+ expect ! [ [ r#"
1249
+ *foo*
1250
+
1251
+ ```rust
1252
+ test
1253
+ ```
1254
+
1255
+ ```rust
1256
+ macro foo
1257
+ ```
1258
+
1259
+ ---
1260
+
1261
+ foo bar
1262
+
1263
+ foo bar baz
1264
+ "# ] ] ,
1265
+ )
1266
+ }
1267
+
1237
1268
#[ test]
1238
1269
fn test_hover_tuple_field ( ) {
1239
1270
check (
Original file line number Diff line number Diff line change @@ -147,8 +147,8 @@ fn n_attached_trivias<'a>(
147
147
trivias : impl Iterator < Item = ( SyntaxKind , & ' a str ) > ,
148
148
) -> usize {
149
149
match kind {
150
- MACRO_CALL | MACRO_RULES | CONST | TYPE_ALIAS | STRUCT | UNION | ENUM | VARIANT | FN
151
- | TRAIT | MODULE | RECORD_FIELD | STATIC | USE => {
150
+ MACRO_CALL | MACRO_RULES | MACRO_DEF | CONST | TYPE_ALIAS | STRUCT | UNION | ENUM
151
+ | VARIANT | FN | TRAIT | MODULE | RECORD_FIELD | STATIC | USE => {
152
152
let mut res = 0 ;
153
153
let mut trivias = trivias. enumerate ( ) . peekable ( ) ;
154
154
You can’t perform that action at this time.
0 commit comments