aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/module/nameres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/module/nameres')
-rw-r--r--crates/ra_hir/src/module/nameres/tests.rs7
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 9ddc32dcd..9fa9146e3 100644
--- a/crates/ra_hir/src/module/nameres/tests.rs
+++ b/crates/ra_hir/src/module/nameres/tests.rs
@@ -3,6 +3,7 @@ use std::sync::Arc;
3use salsa::Database; 3use salsa::Database;
4use ra_db::{FilesDatabase, CrateGraph}; 4use ra_db::{FilesDatabase, CrateGraph};
5use ra_syntax::SmolStr; 5use ra_syntax::SmolStr;
6use relative_path::RelativePath;
6 7
7use crate::{ 8use crate::{
8 self as hir, 9 self as hir,
@@ -44,7 +45,7 @@ fn item_map_smoke_test() {
44 45
45#[test] 46#[test]
46fn item_map_across_crates() { 47fn item_map_across_crates() {
47 let (mut db, files) = MockDatabase::with_files( 48 let (mut db, sr) = MockDatabase::with_files(
48 " 49 "
49 //- /main.rs 50 //- /main.rs
50 use test_crate::Baz; 51 use test_crate::Baz;
@@ -53,8 +54,8 @@ fn item_map_across_crates() {
53 pub struct Baz; 54 pub struct Baz;
54 ", 55 ",
55 ); 56 );
56 let main_id = files.file_id("/main.rs"); 57 let main_id = sr.files[RelativePath::new("/main.rs")];
57 let lib_id = files.file_id("/lib.rs"); 58 let lib_id = sr.files[RelativePath::new("/lib.rs")];
58 59
59 let mut crate_graph = CrateGraph::default(); 60 let mut crate_graph = CrateGraph::default();
60 let main_crate = crate_graph.add_crate_root(main_id); 61 let main_crate = crate_graph.add_crate_root(main_id);