aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/nameres/tests.rs')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs
index 42c59f76f..0654dbaa1 100644
--- a/crates/ra_hir/src/nameres/tests.rs
+++ b/crates/ra_hir/src/nameres/tests.rs
@@ -329,7 +329,6 @@ fn item_map_across_crates() {
329 module.module_id, 329 module.module_id,
330 " 330 "
331 Baz: t v 331 Baz: t v
332 test_crate: t
333 ", 332 ",
334 ); 333 );
335} 334}
@@ -342,7 +341,9 @@ fn extern_crate_rename() {
342 extern crate alloc as alloc_crate; 341 extern crate alloc as alloc_crate;
343 342
344 mod alloc; 343 mod alloc;
344 mod sync;
345 345
346 //- /sync.rs
346 use alloc_crate::Arc; 347 use alloc_crate::Arc;
347 348
348 //- /lib.rs 349 //- /lib.rs
@@ -350,6 +351,7 @@ fn extern_crate_rename() {
350 ", 351 ",
351 ); 352 );
352 let main_id = sr.files[RelativePath::new("/main.rs")]; 353 let main_id = sr.files[RelativePath::new("/main.rs")];
354 let sync_id = sr.files[RelativePath::new("/sync.rs")];
353 let lib_id = sr.files[RelativePath::new("/lib.rs")]; 355 let lib_id = sr.files[RelativePath::new("/lib.rs")];
354 356
355 let mut crate_graph = CrateGraph::default(); 357 let mut crate_graph = CrateGraph::default();
@@ -361,7 +363,7 @@ fn extern_crate_rename() {
361 363
362 db.set_crate_graph(Arc::new(crate_graph)); 364 db.set_crate_graph(Arc::new(crate_graph));
363 365
364 let module = crate::source_binder::module_from_file_id(&db, main_id).unwrap(); 366 let module = crate::source_binder::module_from_file_id(&db, sync_id).unwrap();
365 let krate = module.krate(&db).unwrap(); 367 let krate = module.krate(&db).unwrap();
366 let item_map = db.item_map(krate); 368 let item_map = db.item_map(krate);
367 369
@@ -370,8 +372,6 @@ fn extern_crate_rename() {
370 module.module_id, 372 module.module_id,
371 " 373 "
372 Arc: t v 374 Arc: t v
373 alloc: t
374 alloc_crate: t
375 ", 375 ",
376 ); 376 );
377} 377}
@@ -403,8 +403,6 @@ fn import_across_source_roots() {
403 403
404 let main_id = sr2.files[RelativePath::new("/main.rs")]; 404 let main_id = sr2.files[RelativePath::new("/main.rs")];
405 405
406 eprintln!("lib = {:?}, main = {:?}", lib_id, main_id);
407
408 let mut crate_graph = CrateGraph::default(); 406 let mut crate_graph = CrateGraph::default();
409 let main_crate = crate_graph.add_crate_root(main_id); 407 let main_crate = crate_graph.add_crate_root(main_id);
410 let lib_crate = crate_graph.add_crate_root(lib_id); 408 let lib_crate = crate_graph.add_crate_root(lib_id);
@@ -423,7 +421,6 @@ fn import_across_source_roots() {
423 module.module_id, 421 module.module_id,
424 " 422 "
425 C: t v 423 C: t v
426 test_crate: t
427 ", 424 ",
428 ); 425 );
429} 426}
@@ -465,7 +462,6 @@ fn reexport_across_crates() {
465 module.module_id, 462 module.module_id,
466 " 463 "
467 Baz: t v 464 Baz: t v
468 test_crate: t
469 ", 465 ",
470 ); 466 );
471} 467}