aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-25 12:25:01 +0000
committerAleksey Kladov <[email protected]>2019-01-25 12:25:01 +0000
commit08c12e424d5d3fb4e11f081a07b9c265dc7a96b6 (patch)
tree9ae3e23ac30d71f503673623f10b5eeaed1d9fef /crates/ra_hir/src/nameres
parent8cf092d5de113fc218b84421a2db4449a370ccb6 (diff)
use set methods
Diffstat (limited to 'crates/ra_hir/src/nameres')
-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(|| {