aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r--crates/ra_hir_def/src/nameres/tests.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests.rs b/crates/ra_hir_def/src/nameres/tests.rs
index 87fcd617c..61cdd768e 100644
--- a/crates/ra_hir_def/src/nameres/tests.rs
+++ b/crates/ra_hir_def/src/nameres/tests.rs
@@ -558,3 +558,35 @@ fn cfg_test() {
558 ⋮Foo: t v 558 ⋮Foo: t v
559 "###); 559 "###);
560} 560}
561
562#[test]
563fn infer_multiple_namespace() {
564 let map = def_map(
565 r#"
566//- /main.rs
567mod a {
568 pub type T = ();
569 pub use crate::b::*;
570}
571
572use crate::a::T;
573
574mod b {
575 pub const T: () = ();
576}
577"#,
578 );
579
580 assert_snapshot!(map, @r###"
581 ⋮crate
582 ⋮T: t v
583 ⋮a: t
584 ⋮b: t
585
586 ⋮crate::b
587 ⋮T: v
588
589 ⋮crate::a
590 ⋮T: t v
591"###);
592}