aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres/tests.rs')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs
index 36c1d74ce..f73f9d8a6 100644
--- a/crates/ra_hir/src/nameres/tests.rs
+++ b/crates/ra_hir/src/nameres/tests.rs
@@ -97,6 +97,32 @@ E: t
97} 97}
98 98
99#[test] 99#[test]
100fn bogus_paths() {
101 covers!(bogus_paths);
102 let map = def_map(
103 "
104 //- /lib.rs
105 mod foo;
106 struct S;
107 use self;
108
109 //- /foo/mod.rs
110 use super;
111 use crate;
112
113 ",
114 );
115 assert_snapshot_matches!(map, @r###"
116crate
117foo: t
118S: t v
119
120crate::foo
121"###
122 )
123}
124
125#[test]
100fn use_as() { 126fn use_as() {
101 let map = def_map( 127 let map = def_map(
102 " 128 "