aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/tests/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src/nameres/tests/macros.rs')
-rw-r--r--crates/hir_def/src/nameres/tests/macros.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/macros.rs b/crates/hir_def/src/nameres/tests/macros.rs
index e5e9e8ca1..36ed5e8ce 100644
--- a/crates/hir_def/src/nameres/tests/macros.rs
+++ b/crates/hir_def/src/nameres/tests/macros.rs
@@ -391,11 +391,21 @@ foo!(ok_shadow);
391mod m4; 391mod m4;
392bar!(OkMacroUse); 392bar!(OkMacroUse);
393 393
394mod m5;
395baz!(OkMacroUseInner);
396
394//- /m3/m4.rs 397//- /m3/m4.rs
395foo!(ok_shadow_deep); 398foo!(ok_shadow_deep);
396macro_rules! bar { 399macro_rules! bar {
397 ($x:ident) => { struct $x; } 400 ($x:ident) => { struct $x; }
398} 401}
402//- /m3/m5.rs
403#![macro_use]
404macro_rules! baz {
405 ($x:ident) => { struct $x; }
406}
407
408
399"#, 409"#,
400 expect![[r#" 410 expect![[r#"
401 crate 411 crate
@@ -423,11 +433,15 @@ macro_rules! bar {
423 crate::m3 433 crate::m3
424 OkAfterInside: t v 434 OkAfterInside: t v
425 OkMacroUse: t v 435 OkMacroUse: t v
436 OkMacroUseInner: t v
426 m4: t 437 m4: t
438 m5: t
427 ok_shadow: v 439 ok_shadow: v
428 440
429 crate::m3::m4 441 crate::m3::m4
430 ok_shadow_deep: v 442 ok_shadow_deep: v
443
444 crate::m3::m5
431 "#]], 445 "#]],
432 ); 446 );
433} 447}