diff options
author | Aleksey Kladov <[email protected]> | 2019-01-15 15:13:11 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-15 15:13:49 +0000 |
commit | 11f3c8afb23d67acde8cc7642aea3a2ca06a2361 (patch) | |
tree | 324f517c3e8cc42be6f3e8349c55683695ea4558 /crates/ra_hir/src/nameres | |
parent | a36b2cf377a90cf13bb097e57878b8384d30c53a (diff) |
remove Cancelable from source binders
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index 647fd92aa..ea8ab4c83 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -15,9 +15,7 @@ use crate::{ | |||
15 | fn item_map(fixture: &str) -> (Arc<ItemMap>, ModuleId) { | 15 | fn item_map(fixture: &str) -> (Arc<ItemMap>, ModuleId) { |
16 | let (db, pos) = MockDatabase::with_position(fixture); | 16 | let (db, pos) = MockDatabase::with_position(fixture); |
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) | 18 | let module = crate::source_binder::module_from_position(&db, pos).unwrap(); |
19 | .unwrap() | ||
20 | .unwrap(); | ||
21 | let module_id = module.def_id.loc(&db).module_id; | 19 | let module_id = module.def_id.loc(&db).module_id; |
22 | (db.item_map(source_root).unwrap(), module_id) | 20 | (db.item_map(source_root).unwrap(), module_id) |
23 | } | 21 | } |
@@ -242,9 +240,7 @@ fn item_map_across_crates() { | |||
242 | db.set_crate_graph(crate_graph); | 240 | db.set_crate_graph(crate_graph); |
243 | 241 | ||
244 | let source_root = db.file_source_root(main_id); | 242 | let source_root = db.file_source_root(main_id); |
245 | let module = crate::source_binder::module_from_file_id(&db, main_id) | 243 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
246 | .unwrap() | ||
247 | .unwrap(); | ||
248 | let module_id = module.def_id.loc(&db).module_id; | 244 | let module_id = module.def_id.loc(&db).module_id; |
249 | let item_map = db.item_map(source_root).unwrap(); | 245 | let item_map = db.item_map(source_root).unwrap(); |
250 | 246 | ||
@@ -296,9 +292,7 @@ fn import_across_source_roots() { | |||
296 | 292 | ||
297 | db.set_crate_graph(crate_graph); | 293 | db.set_crate_graph(crate_graph); |
298 | 294 | ||
299 | let module = crate::source_binder::module_from_file_id(&db, main_id) | 295 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
300 | .unwrap() | ||
301 | .unwrap(); | ||
302 | let module_id = module.def_id.loc(&db).module_id; | 296 | let module_id = module.def_id.loc(&db).module_id; |
303 | let item_map = db.item_map(source_root).unwrap(); | 297 | let item_map = db.item_map(source_root).unwrap(); |
304 | 298 | ||
@@ -341,9 +335,7 @@ fn reexport_across_crates() { | |||
341 | db.set_crate_graph(crate_graph); | 335 | db.set_crate_graph(crate_graph); |
342 | 336 | ||
343 | let source_root = db.file_source_root(main_id); | 337 | let source_root = db.file_source_root(main_id); |
344 | let module = crate::source_binder::module_from_file_id(&db, main_id) | 338 | let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); |
345 | .unwrap() | ||
346 | .unwrap(); | ||
347 | let module_id = module.def_id.loc(&db).module_id; | 339 | let module_id = module.def_id.loc(&db).module_id; |
348 | let item_map = db.item_map(source_root).unwrap(); | 340 | let item_map = db.item_map(source_root).unwrap(); |
349 | 341 | ||