aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/references
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/references')
-rw-r--r--crates/ra_ide/src/references/classify.rs6
-rw-r--r--crates/ra_ide/src/references/rename.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/references/classify.rs b/crates/ra_ide/src/references/classify.rs
index 5cea805ec..b716d32e5 100644
--- a/crates/ra_ide/src/references/classify.rs
+++ b/crates/ra_ide/src/references/classify.rs
@@ -1,6 +1,6 @@
1//! Functions that are used to classify an element from its definition or reference. 1//! Functions that are used to classify an element from its definition or reference.
2 2
3use hir::{FromSource, Module, ModuleSource, PathResolution, Source, SourceAnalyzer}; 3use hir::{FromSource, InFile, Module, ModuleSource, PathResolution, SourceAnalyzer};
4use ra_prof::profile; 4use ra_prof::profile;
5use ra_syntax::{ast, match_ast, AstNode}; 5use ra_syntax::{ast, match_ast, AstNode};
6use test_utils::tested_by; 6use test_utils::tested_by;
@@ -11,7 +11,7 @@ use super::{
11}; 11};
12use crate::db::RootDatabase; 12use crate::db::RootDatabase;
13 13
14pub(crate) fn classify_name(db: &RootDatabase, name: Source<&ast::Name>) -> Option<NameDefinition> { 14pub(crate) fn classify_name(db: &RootDatabase, name: InFile<&ast::Name>) -> Option<NameDefinition> {
15 let _p = profile("classify_name"); 15 let _p = profile("classify_name");
16 let parent = name.value.syntax().parent()?; 16 let parent = name.value.syntax().parent()?;
17 17
@@ -117,7 +117,7 @@ pub(crate) fn classify_name(db: &RootDatabase, name: Source<&ast::Name>) -> Opti
117 117
118pub(crate) fn classify_name_ref( 118pub(crate) fn classify_name_ref(
119 db: &RootDatabase, 119 db: &RootDatabase,
120 name_ref: Source<&ast::NameRef>, 120 name_ref: InFile<&ast::NameRef>,
121) -> Option<NameDefinition> { 121) -> Option<NameDefinition> {
122 let _p = profile("classify_name_ref"); 122 let _p = profile("classify_name_ref");
123 123
diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs
index d58496049..ea6b354c2 100644
--- a/crates/ra_ide/src/references/rename.rs
+++ b/crates/ra_ide/src/references/rename.rs
@@ -55,7 +55,7 @@ fn rename_mod(
55) -> Option<SourceChange> { 55) -> Option<SourceChange> {
56 let mut source_file_edits = Vec::new(); 56 let mut source_file_edits = Vec::new();
57 let mut file_system_edits = Vec::new(); 57 let mut file_system_edits = Vec::new();
58 let module_src = hir::Source { file_id: position.file_id.into(), value: ast_module.clone() }; 58 let module_src = hir::InFile { file_id: position.file_id.into(), value: ast_module.clone() };
59 if let Some(module) = hir::Module::from_declaration(db, module_src) { 59 if let Some(module) = hir::Module::from_declaration(db, module_src) {
60 let src = module.definition_source(db); 60 let src = module.definition_source(db);
61 let file_id = src.file_id.original_file(db); 61 let file_id = src.file_id.original_file(db);