diff options
Diffstat (limited to 'crates/ra_hir_def/src/nameres/tests/mod_resolution.rs')
-rw-r--r-- | crates/ra_hir_def/src/nameres/tests/mod_resolution.rs | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs index 22103ab29..b502a4079 100644 --- a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs +++ b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs | |||
@@ -4,7 +4,7 @@ use super::*; | |||
4 | fn name_res_works_for_broken_modules() { | 4 | fn name_res_works_for_broken_modules() { |
5 | covers!(name_res_works_for_broken_modules); | 5 | covers!(name_res_works_for_broken_modules); |
6 | let map = def_map( | 6 | let map = def_map( |
7 | " | 7 | r" |
8 | //- /lib.rs | 8 | //- /lib.rs |
9 | mod foo // no `;`, no body | 9 | mod foo // no `;`, no body |
10 | 10 | ||
@@ -28,7 +28,7 @@ fn name_res_works_for_broken_modules() { | |||
28 | #[test] | 28 | #[test] |
29 | fn nested_module_resolution() { | 29 | fn nested_module_resolution() { |
30 | let map = def_map( | 30 | let map = def_map( |
31 | " | 31 | r" |
32 | //- /lib.rs | 32 | //- /lib.rs |
33 | mod n1; | 33 | mod n1; |
34 | 34 | ||
@@ -55,7 +55,7 @@ fn nested_module_resolution() { | |||
55 | #[test] | 55 | #[test] |
56 | fn nested_module_resolution_2() { | 56 | fn nested_module_resolution_2() { |
57 | let map = def_map( | 57 | let map = def_map( |
58 | " | 58 | r" |
59 | //- /lib.rs | 59 | //- /lib.rs |
60 | mod prelude; | 60 | mod prelude; |
61 | mod iter; | 61 | mod iter; |
@@ -77,23 +77,23 @@ fn nested_module_resolution_2() { | |||
77 | ); | 77 | ); |
78 | 78 | ||
79 | assert_snapshot!(map, @r###" | 79 | assert_snapshot!(map, @r###" |
80 | crate | 80 | ⋮crate |
81 | iter: t | 81 | ⋮iter: t |
82 | prelude: t | 82 | ⋮prelude: t |
83 | 83 | ⋮ | |
84 | crate::iter | 84 | ⋮crate::iter |
85 | Iterator: t | 85 | ⋮Iterator: t |
86 | traits: t | 86 | ⋮traits: t |
87 | 87 | ⋮ | |
88 | crate::iter::traits | 88 | ⋮crate::iter::traits |
89 | Iterator: t | 89 | ⋮Iterator: t |
90 | iterator: t | 90 | ⋮iterator: t |
91 | 91 | ⋮ | |
92 | crate::iter::traits::iterator | 92 | ⋮crate::iter::traits::iterator |
93 | Iterator: t | 93 | ⋮Iterator: t |
94 | 94 | ⋮ | |
95 | crate::prelude | 95 | ⋮crate::prelude |
96 | Iterator: t | 96 | ⋮Iterator: t |
97 | "###); | 97 | "###); |
98 | } | 98 | } |
99 | 99 | ||
@@ -780,17 +780,17 @@ fn nested_out_of_line_module() { | |||
780 | ); | 780 | ); |
781 | 781 | ||
782 | assert_snapshot!(map, @r###" | 782 | assert_snapshot!(map, @r###" |
783 | crate | 783 | ⋮crate |
784 | a: t | 784 | ⋮a: t |
785 | 785 | ⋮ | |
786 | crate::a | 786 | ⋮crate::a |
787 | b: t | 787 | ⋮b: t |
788 | 788 | ⋮ | |
789 | crate::a::b | 789 | ⋮crate::a::b |
790 | c: t | 790 | ⋮c: t |
791 | 791 | ⋮ | |
792 | crate::a::b::c | 792 | ⋮crate::a::b::c |
793 | X: t v | 793 | ⋮X: t v |
794 | "###); | 794 | "###); |
795 | } | 795 | } |
796 | 796 | ||
@@ -812,16 +812,16 @@ fn nested_out_of_line_module_with_path() { | |||
812 | ); | 812 | ); |
813 | 813 | ||
814 | assert_snapshot!(map, @r###" | 814 | assert_snapshot!(map, @r###" |
815 | crate | 815 | ⋮crate |
816 | a: t | 816 | ⋮a: t |
817 | 817 | ⋮ | |
818 | crate::a | 818 | ⋮crate::a |
819 | b: t | 819 | ⋮b: t |
820 | 820 | ⋮ | |
821 | crate::a::b | 821 | ⋮crate::a::b |
822 | c: t | 822 | ⋮c: t |
823 | 823 | ⋮ | |
824 | crate::a::b::c | 824 | ⋮crate::a::b::c |
825 | X: t v | 825 | ⋮X: t v |
826 | "###); | 826 | "###); |
827 | } | 827 | } |