aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/nameres/tests/primitives.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-03 21:34:50 +0000
committerGitHub <[email protected]>2019-11-03 21:34:50 +0000
commit4fd742d6bc23e2f61d0980e15234f09d7e715b76 (patch)
treec37d38f9313f54ea71580f6bd005f554388a57ab /crates/ra_hir_def/src/nameres/tests/primitives.rs
parentf9f1effd011b906903891c09f1cb6b2a42f73e95 (diff)
parent8922a44395482896fec0c0a47a7fac4612112d45 (diff)
Merge #2163
2163: Move CrateDefMap to hir_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/nameres/tests/primitives.rs')
-rw-r--r--crates/ra_hir_def/src/nameres/tests/primitives.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/ra_hir_def/src/nameres/tests/primitives.rs b/crates/ra_hir_def/src/nameres/tests/primitives.rs
new file mode 100644
index 000000000..0e2708658
--- /dev/null
+++ b/crates/ra_hir_def/src/nameres/tests/primitives.rs
@@ -0,0 +1,24 @@
1use super::*;
2
3#[test]
4fn primitive_reexport() {
5 let map = def_map(
6 "
7 //- /lib.rs
8 mod foo;
9 use foo::int;
10
11 //- /foo.rs
12 pub use i32 as int;
13 ",
14 );
15 assert_snapshot!(map, @r###"
16 ⋮crate
17 ⋮foo: t
18 ⋮int: t
19
20 ⋮crate::foo
21 ⋮int: t
22 "###
23 );
24}