diff options
Diffstat (limited to 'crates/hir_def/src/find_path.rs')
-rw-r--r-- | crates/hir_def/src/find_path.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs index 41da3bc2d..2c4bbe585 100644 --- a/crates/hir_def/src/find_path.rs +++ b/crates/hir_def/src/find_path.rs | |||
@@ -955,6 +955,29 @@ fn main() { | |||
955 | } | 955 | } |
956 | 956 | ||
957 | #[test] | 957 | #[test] |
958 | fn from_inside_module() { | ||
959 | // This worked correctly, but the test suite logic was broken. | ||
960 | cov_mark::check!(submodule_in_testdb); | ||
961 | check_found_path( | ||
962 | r#" | ||
963 | mod baz { | ||
964 | pub struct Foo {} | ||
965 | } | ||
966 | |||
967 | mod bar { | ||
968 | fn bar() { | ||
969 | $0 | ||
970 | } | ||
971 | } | ||
972 | "#, | ||
973 | "crate::baz::Foo", | ||
974 | "crate::baz::Foo", | ||
975 | "crate::baz::Foo", | ||
976 | "crate::baz::Foo", | ||
977 | ) | ||
978 | } | ||
979 | |||
980 | #[test] | ||
958 | fn recursive_pub_mod_reexport() { | 981 | fn recursive_pub_mod_reexport() { |
959 | cov_mark::check!(recursive_imports); | 982 | cov_mark::check!(recursive_imports); |
960 | check_found_path( | 983 | check_found_path( |