diff options
Diffstat (limited to 'crates/ra_hir/src/module/nameres/tests.rs')
-rw-r--r-- | crates/ra_hir/src/module/nameres/tests.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir/src/module/nameres/tests.rs b/crates/ra_hir/src/module/nameres/tests.rs index 03ea5c1d6..165ac81c8 100644 --- a/crates/ra_hir/src/module/nameres/tests.rs +++ b/crates/ra_hir/src/module/nameres/tests.rs | |||
@@ -9,6 +9,7 @@ use crate::{ | |||
9 | self as hir, | 9 | self as hir, |
10 | db::HirDatabase, | 10 | db::HirDatabase, |
11 | mock::MockDatabase, | 11 | mock::MockDatabase, |
12 | Name, | ||
12 | }; | 13 | }; |
13 | 14 | ||
14 | fn item_map(fixture: &str) -> (Arc<hir::ItemMap>, hir::ModuleId) { | 15 | fn item_map(fixture: &str) -> (Arc<hir::ItemMap>, hir::ModuleId) { |
@@ -38,7 +39,7 @@ fn item_map_smoke_test() { | |||
38 | pub struct Baz; | 39 | pub struct Baz; |
39 | ", | 40 | ", |
40 | ); | 41 | ); |
41 | let name = SmolStr::from("Baz"); | 42 | let name = Name::new(SmolStr::from("Baz")); |
42 | let resolution = &item_map.per_module[&module_id].items[&name]; | 43 | let resolution = &item_map.per_module[&module_id].items[&name]; |
43 | assert!(resolution.def_id.take_types().is_some()); | 44 | assert!(resolution.def_id.take_types().is_some()); |
44 | } | 45 | } |
@@ -57,7 +58,7 @@ fn test_self() { | |||
57 | pub struct Baz; | 58 | pub struct Baz; |
58 | ", | 59 | ", |
59 | ); | 60 | ); |
60 | let name = SmolStr::from("Baz"); | 61 | let name = Name::new(SmolStr::from("Baz")); |
61 | let resolution = &item_map.per_module[&module_id].items[&name]; | 62 | let resolution = &item_map.per_module[&module_id].items[&name]; |
62 | assert!(resolution.def_id.take_types().is_some()); | 63 | assert!(resolution.def_id.take_types().is_some()); |
63 | } | 64 | } |
@@ -90,7 +91,7 @@ fn item_map_across_crates() { | |||
90 | let module_id = module.module_id; | 91 | let module_id = module.module_id; |
91 | let item_map = db.item_map(source_root).unwrap(); | 92 | let item_map = db.item_map(source_root).unwrap(); |
92 | 93 | ||
93 | let name = SmolStr::from("Baz"); | 94 | let name = Name::new(SmolStr::from("Baz")); |
94 | let resolution = &item_map.per_module[&module_id].items[&name]; | 95 | let resolution = &item_map.per_module[&module_id].items[&name]; |
95 | assert!(resolution.def_id.take_types().is_some()); | 96 | assert!(resolution.def_id.take_types().is_some()); |
96 | } | 97 | } |