diff options
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index c033bebe8..24936976c 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | 2 | ||
3 | use ra_db::{CrateGraph, SourceRootId, salsa::Database}; | 3 | use ra_db::{CrateGraph, SourceRootId, FilesDatabase}; |
4 | use relative_path::RelativePath; | 4 | use relative_path::RelativePath; |
5 | use test_utils::{assert_eq_text, covers}; | 5 | use test_utils::{assert_eq_text, covers}; |
6 | 6 | ||
@@ -257,7 +257,7 @@ fn item_map_across_crates() { | |||
257 | .add_dep(main_crate, "test_crate".into(), lib_crate) | 257 | .add_dep(main_crate, "test_crate".into(), lib_crate) |
258 | .unwrap(); | 258 | .unwrap(); |
259 | 259 | ||
260 | db.set_crate_graph(crate_graph); | 260 | db.set_crate_graph(Arc::new(crate_graph)); |
261 | 261 | ||
262 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); | 262 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
263 | let krate = module.krate(&db).unwrap(); | 263 | let krate = module.krate(&db).unwrap(); |
@@ -309,7 +309,7 @@ fn import_across_source_roots() { | |||
309 | .add_dep(main_crate, "test_crate".into(), lib_crate) | 309 | .add_dep(main_crate, "test_crate".into(), lib_crate) |
310 | .unwrap(); | 310 | .unwrap(); |
311 | 311 | ||
312 | db.set_crate_graph(crate_graph); | 312 | db.set_crate_graph(Arc::new(crate_graph)); |
313 | 313 | ||
314 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); | 314 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
315 | let krate = module.krate(&db).unwrap(); | 315 | let krate = module.krate(&db).unwrap(); |
@@ -351,7 +351,7 @@ fn reexport_across_crates() { | |||
351 | .add_dep(main_crate, "test_crate".into(), lib_crate) | 351 | .add_dep(main_crate, "test_crate".into(), lib_crate) |
352 | .unwrap(); | 352 | .unwrap(); |
353 | 353 | ||
354 | db.set_crate_graph(crate_graph); | 354 | db.set_crate_graph(Arc::new(crate_graph)); |
355 | 355 | ||
356 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); | 356 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
357 | let krate = module.krate(&db).unwrap(); | 357 | let krate = module.krate(&db).unwrap(); |
@@ -377,8 +377,7 @@ fn check_item_map_is_not_recomputed(initial: &str, file_change: &str) { | |||
377 | }); | 377 | }); |
378 | assert!(format!("{:?}", events).contains("item_map")) | 378 | assert!(format!("{:?}", events).contains("item_map")) |
379 | } | 379 | } |
380 | db.query_mut(ra_db::FileTextQuery) | 380 | db.set_file_text(pos.file_id, Arc::new(file_change.to_string())); |
381 | .set(pos.file_id, Arc::new(file_change.to_string())); | ||
382 | 381 | ||
383 | { | 382 | { |
384 | let events = db.log_executed(|| { | 383 | let events = db.log_executed(|| { |