aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/tests.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 12:34:10 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 12:34:10 +0000
commit021e691997efc35c983808ee3470a060a3ec3e96 (patch)
treea3f49352542d3c6803e318cd2f155cc4543062c5 /crates/ra_hir/src/nameres/tests.rs
parent04ce89313369a1606b057b3be1368d72b8a5cd63 (diff)
parent08c12e424d5d3fb4e11f081a07b9c265dc7a96b6 (diff)
Merge #639
639: Update salsa r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/nameres/tests.rs')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs11
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 @@
1use std::sync::Arc; 1use std::sync::Arc;
2 2
3use ra_db::{CrateGraph, SourceRootId, salsa::Database}; 3use ra_db::{CrateGraph, SourceRootId, FilesDatabase};
4use relative_path::RelativePath; 4use relative_path::RelativePath;
5use test_utils::{assert_eq_text, covers}; 5use 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(|| {