aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/find_path.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-12 17:26:51 +0100
committerAleksey Kladov <[email protected]>2020-08-12 17:30:53 +0100
commita1c187eef3ba08076aedb5154929f7eda8d1b424 (patch)
tree9d898eb9600b0c36a74e4f95238f679c683fa566 /crates/ra_hir_def/src/find_path.rs
parent3d6889cba72a9d02199f7adaa2ecc69bc30af834 (diff)
Rename ra_syntax -> syntax
Diffstat (limited to 'crates/ra_hir_def/src/find_path.rs')
-rw-r--r--crates/ra_hir_def/src/find_path.rs23
1 files changed, 10 insertions, 13 deletions
diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs
index 46e70eb48..5099f417d 100644
--- a/crates/ra_hir_def/src/find_path.rs
+++ b/crates/ra_hir_def/src/find_path.rs
@@ -294,7 +294,7 @@ fn find_local_import_locations(
294mod tests { 294mod tests {
295 use hir_expand::hygiene::Hygiene; 295 use hir_expand::hygiene::Hygiene;
296 use ra_db::fixture::WithFixture; 296 use ra_db::fixture::WithFixture;
297 use ra_syntax::ast::AstNode; 297 use syntax::ast::AstNode;
298 use test_utils::mark; 298 use test_utils::mark;
299 299
300 use crate::test_db::TestDB; 300 use crate::test_db::TestDB;
@@ -307,12 +307,9 @@ mod tests {
307 fn check_found_path(ra_fixture: &str, path: &str) { 307 fn check_found_path(ra_fixture: &str, path: &str) {
308 let (db, pos) = TestDB::with_position(ra_fixture); 308 let (db, pos) = TestDB::with_position(ra_fixture);
309 let module = db.module_for_file(pos.file_id); 309 let module = db.module_for_file(pos.file_id);
310 let parsed_path_file = ra_syntax::SourceFile::parse(&format!("use {};", path)); 310 let parsed_path_file = syntax::SourceFile::parse(&format!("use {};", path));
311 let ast_path = parsed_path_file 311 let ast_path =
312 .syntax_node() 312 parsed_path_file.syntax_node().descendants().find_map(syntax::ast::Path::cast).unwrap();
313 .descendants()
314 .find_map(ra_syntax::ast::Path::cast)
315 .unwrap();
316 let mod_path = ModPath::from_src(ast_path, &Hygiene::new_unhygienic()).unwrap(); 313 let mod_path = ModPath::from_src(ast_path, &Hygiene::new_unhygienic()).unwrap();
317 314
318 let crate_def_map = db.crate_def_map(module.krate); 315 let crate_def_map = db.crate_def_map(module.krate);
@@ -441,12 +438,12 @@ mod tests {
441 // already in scope. 438 // already in scope.
442 check_found_path( 439 check_found_path(
443 r#" 440 r#"
444 //- /main.rs crate:main deps:ra_syntax 441 //- /main.rs crate:main deps:syntax
445 442
446 use ra_syntax::ast; 443 use syntax::ast;
447 <|> 444 <|>
448 445
449 //- /lib.rs crate:ra_syntax 446 //- /lib.rs crate:syntax
450 pub mod ast { 447 pub mod ast {
451 pub enum ModuleItem { 448 pub enum ModuleItem {
452 A, B, C, 449 A, B, C,
@@ -458,18 +455,18 @@ mod tests {
458 455
459 check_found_path( 456 check_found_path(
460 r#" 457 r#"
461 //- /main.rs crate:main deps:ra_syntax 458 //- /main.rs crate:main deps:syntax
462 459
463 <|> 460 <|>
464 461
465 //- /lib.rs crate:ra_syntax 462 //- /lib.rs crate:syntax
466 pub mod ast { 463 pub mod ast {
467 pub enum ModuleItem { 464 pub enum ModuleItem {
468 A, B, C, 465 A, B, C,
469 } 466 }
470 } 467 }
471 "#, 468 "#,
472 "ra_syntax::ast::ModuleItem", 469 "syntax::ast::ModuleItem",
473 ); 470 );
474 } 471 }
475 472