aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-30 13:14:11 +0100
committerAleksey Kladov <[email protected]>2019-05-30 13:14:11 +0100
commitc6ee9d681c7c745e95f19badef271fec34ec2e36 (patch)
treeed0511c6c0927b14ea39bf9f34032260b588b2d4 /crates/ra_hir/src/nameres
parent97158f5c8a6dadf3bcf28601f739ab6b7c4464aa (diff)
add tests for primitive types
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs1
-rw-r--r--crates/ra_hir/src/nameres/tests/primitives.rs24
2 files changed, 25 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs
index ffb627c02..a15e62bbe 100644
--- a/crates/ra_hir/src/nameres/tests.rs
+++ b/crates/ra_hir/src/nameres/tests.rs
@@ -1,6 +1,7 @@
1mod macros; 1mod macros;
2mod globs; 2mod globs;
3mod incremental; 3mod incremental;
4mod primitives;
4 5
5use std::sync::Arc; 6use std::sync::Arc;
6 7
diff --git a/crates/ra_hir/src/nameres/tests/primitives.rs b/crates/ra_hir/src/nameres/tests/primitives.rs
new file mode 100644
index 000000000..734744835
--- /dev/null
+++ b/crates/ra_hir/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_matches!(map, @r###"
16 ⋮crate
17 ⋮foo: t
18 ⋮int: t
19
20 ⋮crate::foo
21 ⋮int: t
22 "###
23 );
24}