From d2d7a4403cad6913a1944cbe4aaedc6c8b936382 Mon Sep 17 00:00:00 2001 From: James Leitch Date: Sun, 1 Nov 2020 17:20:55 -0700 Subject: Test Fixture ExplicitRoot + ModuleResolutionRelativePathOutsideRoot. --- crates/hir_def/src/nameres/tests/mod_resolution.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'crates/hir_def/src/nameres/tests') 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; fn module_resolution_relative_path_outside_root() { check( r#" -//- /main.rs +//- /a/b/c/d/e/main.rs root: #[path="../../../../../outside.rs"] mod foo; + +//- /outside.rs +mod bar; + +//- /bar.rs +pub struct Baz; "#, expect![[r#" crate - "#]], + foo: t + + crate::foo + bar: t + + crate::foo::bar + Baz: t v +"#]], ); } -- cgit v1.2.3