aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/nameres/tests
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-12-02 08:52:08 +0000
committerLukas Wirth <[email protected]>2020-12-02 08:54:03 +0000
commit7b456552b8ea254b060a2182907d3db98494fcbb (patch)
treec82e888ff9d042e6f7a7037df8bda698cc8617a0 /crates/hir_def/src/nameres/tests
parent13025ae2a121be8320a6ec40ad3519df5640c927 (diff)
Don't discard PathKind::Abs information in lower_use::convert_path
Diffstat (limited to 'crates/hir_def/src/nameres/tests')
-rw-r--r--crates/hir_def/src/nameres/tests/mod_resolution.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/hir_def/src/nameres/tests/mod_resolution.rs b/crates/hir_def/src/nameres/tests/mod_resolution.rs
index ba295fd9e..ef6f85e15 100644
--- a/crates/hir_def/src/nameres/tests/mod_resolution.rs
+++ b/crates/hir_def/src/nameres/tests/mod_resolution.rs
@@ -798,3 +798,24 @@ mod foo;
798"#, 798"#,
799 ); 799 );
800} 800}
801
802#[test]
803fn abs_path_ignores_local() {
804 check(
805 r#"
806//- /main.rs crate:main deps:core
807pub use ::core::hash::Hash;
808pub mod core {}
809
810//- /lib.rs crate:core
811pub mod hash { pub trait Hash {} }
812"#,
813 expect![[r#"
814 crate
815 Hash: t
816 core: t
817
818 crate::core
819 "#]],
820 );
821}