aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/tests/mods.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres/tests/mods.rs')
-rw-r--r--crates/ra_hir/src/nameres/tests/mods.rs56
1 files changed, 28 insertions, 28 deletions
diff --git a/crates/ra_hir/src/nameres/tests/mods.rs b/crates/ra_hir/src/nameres/tests/mods.rs
index 6dd18df1a..4f8398460 100644
--- a/crates/ra_hir/src/nameres/tests/mods.rs
+++ b/crates/ra_hir/src/nameres/tests/mods.rs
@@ -19,7 +19,7 @@ fn name_res_works_for_broken_modules() {
19 pub struct Baz; 19 pub struct Baz;
20 ", 20 ",
21 ); 21 );
22 assert_snapshot_matches!(map, @r###" 22 assert_snapshot!(map, @r###"
23 ⋮crate 23 ⋮crate
24 ⋮Baz: _ 24 ⋮Baz: _
25 "###); 25 "###);
@@ -41,7 +41,7 @@ fn module_resolution_works_for_non_standard_filenames() {
41 }, 41 },
42 ); 42 );
43 43
44 assert_snapshot_matches!(map, @r###" 44 assert_snapshot!(map, @r###"
45 ⋮crate 45 ⋮crate
46 ⋮Bar: t v 46 ⋮Bar: t v
47 ⋮foo: t 47 ⋮foo: t
@@ -67,7 +67,7 @@ fn module_resolution_works_for_raw_modules() {
67 }, 67 },
68 ); 68 );
69 69
70 assert_snapshot_matches!(map, @r###" 70 assert_snapshot!(map, @r###"
71 ⋮crate 71 ⋮crate
72 ⋮Bar: t v 72 ⋮Bar: t v
73 ⋮async: t 73 ⋮async: t
@@ -94,7 +94,7 @@ fn module_resolution_decl_path() {
94 }, 94 },
95 ); 95 );
96 96
97 assert_snapshot_matches!(map, @r###" 97 assert_snapshot!(map, @r###"
98 ⋮crate 98 ⋮crate
99 ⋮Bar: t v 99 ⋮Bar: t v
100 ⋮foo: t 100 ⋮foo: t
@@ -110,7 +110,7 @@ fn module_resolution_module_with_path_in_mod_rs() {
110 r###" 110 r###"
111 //- /main.rs 111 //- /main.rs
112 mod foo; 112 mod foo;
113 113
114 //- /foo/mod.rs 114 //- /foo/mod.rs
115 #[path = "baz.rs"] 115 #[path = "baz.rs"]
116 pub mod bar; 116 pub mod bar;
@@ -125,7 +125,7 @@ fn module_resolution_module_with_path_in_mod_rs() {
125 }, 125 },
126 ); 126 );
127 127
128 assert_snapshot_matches!(map, @r###" 128 assert_snapshot!(map, @r###"
129 ⋮crate 129 ⋮crate
130 ⋮foo: t 130 ⋮foo: t
131 131
@@ -144,7 +144,7 @@ fn module_resolution_module_with_path_non_crate_root() {
144 r###" 144 r###"
145 //- /main.rs 145 //- /main.rs
146 mod foo; 146 mod foo;
147 147
148 //- /foo.rs 148 //- /foo.rs
149 #[path = "baz.rs"] 149 #[path = "baz.rs"]
150 pub mod bar; 150 pub mod bar;
@@ -159,7 +159,7 @@ fn module_resolution_module_with_path_non_crate_root() {
159 }, 159 },
160 ); 160 );
161 161
162 assert_snapshot_matches!(map, @r###" 162 assert_snapshot!(map, @r###"
163 ⋮crate 163 ⋮crate
164 ⋮foo: t 164 ⋮foo: t
165 165
@@ -189,7 +189,7 @@ fn module_resolution_module_decl_path_super() {
189 }, 189 },
190 ); 190 );
191 191
192 assert_snapshot_matches!(map, @r###" 192 assert_snapshot!(map, @r###"
193 ⋮crate 193 ⋮crate
194 ⋮Baz: t v 194 ⋮Baz: t v
195 ⋮foo: t 195 ⋮foo: t
@@ -215,7 +215,7 @@ fn module_resolution_explicit_path_mod_rs() {
215 }, 215 },
216 ); 216 );
217 217
218 assert_snapshot_matches!(map, @r###" 218 assert_snapshot!(map, @r###"
219 ⋮crate 219 ⋮crate
220 ⋮foo: t 220 ⋮foo: t
221 221
@@ -243,7 +243,7 @@ fn module_resolution_relative_path() {
243 }, 243 },
244 ); 244 );
245 245
246 assert_snapshot_matches!(map, @r###" 246 assert_snapshot!(map, @r###"
247 ⋮crate 247 ⋮crate
248 ⋮foo: t 248 ⋮foo: t
249 249
@@ -274,7 +274,7 @@ fn module_resolution_relative_path_2() {
274 }, 274 },
275 ); 275 );
276 276
277 assert_snapshot_matches!(map, @r###" 277 assert_snapshot!(map, @r###"
278 ⋮crate 278 ⋮crate
279 ⋮foo: t 279 ⋮foo: t
280 280
@@ -302,7 +302,7 @@ fn module_resolution_explicit_path_mod_rs_2() {
302 }, 302 },
303 ); 303 );
304 304
305 assert_snapshot_matches!(map, @r###" 305 assert_snapshot!(map, @r###"
306 ⋮crate 306 ⋮crate
307 ⋮foo: t 307 ⋮foo: t
308 308
@@ -327,7 +327,7 @@ fn module_resolution_explicit_path_mod_rs_with_win_separator() {
327 }, 327 },
328 ); 328 );
329 329
330 assert_snapshot_matches!(map, @r###" 330 assert_snapshot!(map, @r###"
331 ⋮crate 331 ⋮crate
332 ⋮foo: t 332 ⋮foo: t
333 333
@@ -354,7 +354,7 @@ fn module_resolution_decl_inside_inline_module_with_path_attribute() {
354 }, 354 },
355 ); 355 );
356 356
357 assert_snapshot_matches!(map, @r###" 357 assert_snapshot!(map, @r###"
358 ⋮crate 358 ⋮crate
359 ⋮foo: t 359 ⋮foo: t
360 360
@@ -383,7 +383,7 @@ fn module_resolution_decl_inside_inline_module() {
383 }, 383 },
384 ); 384 );
385 385
386 assert_snapshot_matches!(map, @r###" 386 assert_snapshot!(map, @r###"
387 ⋮crate 387 ⋮crate
388 ⋮foo: t 388 ⋮foo: t
389 389
@@ -413,7 +413,7 @@ fn module_resolution_decl_inside_inline_module_2_with_path_attribute() {
413 }, 413 },
414 ); 414 );
415 415
416 assert_snapshot_matches!(map, @r###" 416 assert_snapshot!(map, @r###"
417 ⋮crate 417 ⋮crate
418 ⋮foo: t 418 ⋮foo: t
419 419
@@ -444,7 +444,7 @@ fn module_resolution_decl_inside_inline_module_3() {
444 }, 444 },
445 ); 445 );
446 446
447 assert_snapshot_matches!(map, @r###" 447 assert_snapshot!(map, @r###"
448 ⋮crate 448 ⋮crate
449 ⋮foo: t 449 ⋮foo: t
450 450
@@ -475,7 +475,7 @@ fn module_resolution_decl_inside_inline_module_empty_path() {
475 }, 475 },
476 ); 476 );
477 477
478 assert_snapshot_matches!(map, @r###" 478 assert_snapshot!(map, @r###"
479 ⋮crate 479 ⋮crate
480 ⋮foo: t 480 ⋮foo: t
481 481
@@ -503,7 +503,7 @@ fn module_resolution_decl_empty_path() {
503 }, 503 },
504 ); 504 );
505 505
506 assert_snapshot_matches!(map, @r###" 506 assert_snapshot!(map, @r###"
507 ⋮crate 507 ⋮crate
508 ⋮foo: t 508 ⋮foo: t
509 509
@@ -530,7 +530,7 @@ fn module_resolution_decl_inside_inline_module_relative_path() {
530 }, 530 },
531 ); 531 );
532 532
533 assert_snapshot_matches!(map, @r###" 533 assert_snapshot!(map, @r###"
534 ⋮crate 534 ⋮crate
535 ⋮foo: t 535 ⋮foo: t
536 536
@@ -561,7 +561,7 @@ fn module_resolution_decl_inside_inline_module_in_crate_root() {
561 }, 561 },
562 ); 562 );
563 563
564 assert_snapshot_matches!(map, @r###" 564 assert_snapshot!(map, @r###"
565 ⋮crate 565 ⋮crate
566 ⋮Baz: t v 566 ⋮Baz: t v
567 ⋮foo: t 567 ⋮foo: t
@@ -596,7 +596,7 @@ fn module_resolution_decl_inside_inline_module_in_mod_rs() {
596 }, 596 },
597 ); 597 );
598 598
599 assert_snapshot_matches!(map, @r###" 599 assert_snapshot!(map, @r###"
600 ⋮crate 600 ⋮crate
601 ⋮foo: t 601 ⋮foo: t
602 602
@@ -634,7 +634,7 @@ fn module_resolution_decl_inside_inline_module_in_non_crate_root() {
634 }, 634 },
635 ); 635 );
636 636
637 assert_snapshot_matches!(map, @r###" 637 assert_snapshot!(map, @r###"
638 ⋮crate 638 ⋮crate
639 ⋮foo: t 639 ⋮foo: t
640 640
@@ -672,7 +672,7 @@ fn module_resolution_decl_inside_inline_module_in_non_crate_root_2() {
672 }, 672 },
673 ); 673 );
674 674
675 assert_snapshot_matches!(map, @r###" 675 assert_snapshot!(map, @r###"
676 ⋮crate 676 ⋮crate
677 ⋮foo: t 677 ⋮foo: t
678 678
@@ -701,8 +701,8 @@ fn unresolved_module_diagnostics() {
701 ) 701 )
702 .diagnostics(); 702 .diagnostics();
703 703
704 assert_snapshot_matches!(diagnostics, @r###" 704 assert_snapshot!(diagnostics, @r###"
705"mod bar;": unresolved module 705 "mod bar;": unresolved module
706"### 706 "###
707 ); 707 );
708} 708}