From 72fe70f2f8aee9556166ba0f984a29d19a485e61 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 26 Jun 2020 16:25:08 +0200 Subject: Make VFS join methods fallible --- crates/ra_hir_def/src/nameres/tests/mod_resolution.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'crates/ra_hir_def/src/nameres/tests/mod_resolution.rs') 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 e9a5e4cba..753684201 100644 --- a/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs +++ b/crates/ra_hir_def/src/nameres/tests/mod_resolution.rs @@ -334,6 +334,22 @@ fn module_resolution_relative_path_2() { "###); } +#[test] +fn module_resolution_relative_path_outside_root() { + let map = def_map( + r###" + //- /main.rs + + #[path="../../../../../outside.rs"] + mod foo; + "###, + ); + + assert_snapshot!(map, @r###" + â‹®crate + "###); +} + #[test] fn module_resolution_explicit_path_mod_rs_2() { let map = def_map( -- cgit v1.2.3