aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
authorJames Leitch <[email protected]>2020-11-02 00:20:55 +0000
committerJames Leitch <[email protected]>2020-11-02 00:20:55 +0000
commitd2d7a4403cad6913a1944cbe4aaedc6c8b936382 (patch)
treef7cf34e7e6bd2a9cc37cae3e0db5050529b9a27a /crates/hir_def/src
parentbf84e4958ee31c59e5b78f60059d69a73ef659bb (diff)
Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot.
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r--crates/hir_def/src/nameres/tests/mod_resolution.rs17
1 files changed, 15 insertions, 2 deletions
diff --git a/crates/hir_def/src/nameres/tests/mod_resolution.rs b/crates/hir_def/src/nameres/tests/mod_resolution.rs
index f93337a6e..0b2b4429d 100644
--- a/crates/hir_def/src/nameres/tests/mod_resolution.rs
+++ b/crates/hir_def/src/nameres/tests/mod_resolution.rs
@@ -323,13 +323,26 @@ pub struct Baz;
323fn module_resolution_relative_path_outside_root() { 323fn module_resolution_relative_path_outside_root() {
324 check( 324 check(
325 r#" 325 r#"
326//- /main.rs 326//- /a/b/c/d/e/main.rs root:
327#[path="../../../../../outside.rs"] 327#[path="../../../../../outside.rs"]
328mod foo; 328mod foo;
329
330//- /outside.rs
331mod bar;
332
333//- /bar.rs
334pub struct Baz;
329"#, 335"#,
330 expect![[r#" 336 expect![[r#"
331 crate 337 crate
332 "#]], 338 foo: t
339
340 crate::foo
341 bar: t
342
343 crate::foo::bar
344 Baz: t v
345"#]],
333 ); 346 );
334} 347}
335 348