diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 16:20:31 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 16:20:31 +0000 |
commit | 323938dae58576f5fa86ddebf88fdcb5b09662ed (patch) | |
tree | dfeae99da99f6f9b2d91d31f84c0a3b527cfffbe /crates/ra_hir/src/nameres | |
parent | 72a4951023f11adfdf0eac353c99d8a01a9471fc (diff) | |
parent | fafcd103d26821a8408572514201a40765bb2d2b (diff) |
Merge #555
555: remove Cancelable from ids r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index ea8ab4c83..9a0474045 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -17,7 +17,7 @@ fn item_map(fixture: &str) -> (Arc<ItemMap>, ModuleId) { | |||
17 | let source_root = db.file_source_root(pos.file_id); | 17 | let source_root = db.file_source_root(pos.file_id); |
18 | let module = crate::source_binder::module_from_position(&db, pos).unwrap(); | 18 | let module = crate::source_binder::module_from_position(&db, pos).unwrap(); |
19 | let module_id = module.def_id.loc(&db).module_id; | 19 | let module_id = module.def_id.loc(&db).module_id; |
20 | (db.item_map(source_root).unwrap(), module_id) | 20 | (db.item_map(source_root), module_id) |
21 | } | 21 | } |
22 | 22 | ||
23 | fn check_module_item_map(map: &ItemMap, module_id: ModuleId, expected: &str) { | 23 | fn check_module_item_map(map: &ItemMap, module_id: ModuleId, expected: &str) { |
@@ -242,7 +242,7 @@ fn item_map_across_crates() { | |||
242 | let source_root = db.file_source_root(main_id); | 242 | let source_root = db.file_source_root(main_id); |
243 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); | 243 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
244 | let module_id = module.def_id.loc(&db).module_id; | 244 | let module_id = module.def_id.loc(&db).module_id; |
245 | let item_map = db.item_map(source_root).unwrap(); | 245 | let item_map = db.item_map(source_root); |
246 | 246 | ||
247 | check_module_item_map( | 247 | check_module_item_map( |
248 | &item_map, | 248 | &item_map, |
@@ -294,7 +294,7 @@ fn import_across_source_roots() { | |||
294 | 294 | ||
295 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); | 295 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
296 | let module_id = module.def_id.loc(&db).module_id; | 296 | let module_id = module.def_id.loc(&db).module_id; |
297 | let item_map = db.item_map(source_root).unwrap(); | 297 | let item_map = db.item_map(source_root); |
298 | 298 | ||
299 | check_module_item_map( | 299 | check_module_item_map( |
300 | &item_map, | 300 | &item_map, |
@@ -337,7 +337,7 @@ fn reexport_across_crates() { | |||
337 | let source_root = db.file_source_root(main_id); | 337 | let source_root = db.file_source_root(main_id); |
338 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); | 338 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
339 | let module_id = module.def_id.loc(&db).module_id; | 339 | let module_id = module.def_id.loc(&db).module_id; |
340 | let item_map = db.item_map(source_root).unwrap(); | 340 | let item_map = db.item_map(source_root); |
341 | 341 | ||
342 | check_module_item_map( | 342 | check_module_item_map( |
343 | &item_map, | 343 | &item_map, |
@@ -354,7 +354,7 @@ fn check_item_map_is_not_recomputed(initial: &str, file_change: &str) { | |||
354 | let source_root = db.file_source_root(pos.file_id); | 354 | let source_root = db.file_source_root(pos.file_id); |
355 | { | 355 | { |
356 | let events = db.log_executed(|| { | 356 | let events = db.log_executed(|| { |
357 | db.item_map(source_root).unwrap(); | 357 | db.item_map(source_root); |
358 | }); | 358 | }); |
359 | assert!(format!("{:?}", events).contains("item_map")) | 359 | assert!(format!("{:?}", events).contains("item_map")) |
360 | } | 360 | } |
@@ -363,7 +363,7 @@ fn check_item_map_is_not_recomputed(initial: &str, file_change: &str) { | |||
363 | 363 | ||
364 | { | 364 | { |
365 | let events = db.log_executed(|| { | 365 | let events = db.log_executed(|| { |
366 | db.item_map(source_root).unwrap(); | 366 | db.item_map(source_root); |
367 | }); | 367 | }); |
368 | assert!( | 368 | assert!( |
369 | !format!("{:?}", events).contains("item_map"), | 369 | !format!("{:?}", events).contains("item_map"), |