From d963042ca9da93be8d5922ce46ea26dc6a79c929 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 27 Dec 2018 20:07:21 +0300 Subject: introduce hir::Name --- crates/ra_hir/src/module/nameres/tests.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/module/nameres') 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::{ self as hir, db::HirDatabase, mock::MockDatabase, + Name, }; fn item_map(fixture: &str) -> (Arc, hir::ModuleId) { @@ -38,7 +39,7 @@ fn item_map_smoke_test() { pub struct Baz; ", ); - let name = SmolStr::from("Baz"); + let name = Name::new(SmolStr::from("Baz")); let resolution = &item_map.per_module[&module_id].items[&name]; assert!(resolution.def_id.take_types().is_some()); } @@ -57,7 +58,7 @@ fn test_self() { pub struct Baz; ", ); - let name = SmolStr::from("Baz"); + let name = Name::new(SmolStr::from("Baz")); let resolution = &item_map.per_module[&module_id].items[&name]; assert!(resolution.def_id.take_types().is_some()); } @@ -90,7 +91,7 @@ fn item_map_across_crates() { let module_id = module.module_id; let item_map = db.item_map(source_root).unwrap(); - let name = SmolStr::from("Baz"); + let name = Name::new(SmolStr::from("Baz")); let resolution = &item_map.per_module[&module_id].items[&name]; assert!(resolution.def_id.take_types().is_some()); } -- cgit v1.2.3