Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/annotations.rs')
-rw-r--r--crates/ide/src/annotations.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs
index e47891bbdf..3d71da985b 100644
--- a/crates/ide/src/annotations.rs
+++ b/crates/ide/src/annotations.rs
@@ -1,17 +1,17 @@
use hir::{HasSource, InFile, InRealFile, Semantics};
use ide_db::{
- defs::Definition, helpers::visit_file_defs, FileId, FilePosition, FileRange, FxIndexSet,
- RootDatabase,
+ FileId, FilePosition, FileRange, FxIndexSet, RootDatabase, defs::Definition,
+ helpers::visit_file_defs,
};
use itertools::Itertools;
-use syntax::{ast::HasName, AstNode, TextRange};
+use syntax::{AstNode, TextRange, ast::HasName};
use crate::{
+ NavigationTarget, RunnableKind,
annotations::fn_references::find_all_methods,
goto_implementation::goto_implementation,
references::find_all_refs,
- runnables::{runnables, Runnable},
- NavigationTarget, RunnableKind,
+ runnables::{Runnable, runnables},
};
mod fn_references;
@@ -149,7 +149,7 @@ pub(crate) fn annotations(
source_file_id: FileId,
) -> Option<(TextRange, Option<TextRange>)> {
if let Some(InRealFile { file_id, value }) = node.original_ast_node_rooted(db) {
- if file_id == source_file_id {
+ if file_id.file_id(db) == source_file_id {
return Some((
value.syntax().text_range(),
value.name().map(|name| name.syntax().text_range()),
@@ -209,9 +209,9 @@ fn should_skip_runnable(kind: &RunnableKind, binary_target: bool) -> bool {
#[cfg(test)]
mod tests {
- use expect_test::{expect, Expect};
+ use expect_test::{Expect, expect};
- use crate::{fixture, Annotation, AnnotationConfig};
+ use crate::{Annotation, AnnotationConfig, fixture};
use super::AnnotationLocation;