Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/helpers.rs')
-rw-r--r--crates/ide-db/src/helpers.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/ide-db/src/helpers.rs b/crates/ide-db/src/helpers.rs
index 84fa58d743..340429037e 100644
--- a/crates/ide-db/src/helpers.rs
+++ b/crates/ide-db/src/helpers.rs
@@ -2,17 +2,18 @@
use std::collections::VecDeque;
-use base_db::SourceRootDatabase;
+use base_db::SourceDatabase;
use hir::{Crate, ItemInNs, ModuleDef, Name, Semantics};
use span::{Edition, FileId};
use syntax::{
- ast::{self, make},
AstToken, SyntaxKind, SyntaxToken, ToSmolStr, TokenAtOffset,
+ ast::{self, make},
};
use crate::{
+ RootDatabase,
defs::{Definition, IdentClass},
- generated, RootDatabase,
+ generated,
};
pub fn item_name(db: &RootDatabase, item: ItemInNs) -> Option<Name> {
@@ -108,8 +109,8 @@ pub fn lint_eq_or_in_group(lint: &str, lint_is: &str) -> bool {
pub fn is_editable_crate(krate: Crate, db: &RootDatabase) -> bool {
let root_file = krate.root_file(db);
- let source_root_id = db.file_source_root(root_file);
- !db.source_root(source_root_id).is_library
+ let source_root_id = db.file_source_root(root_file).source_root_id(db);
+ !db.source_root(source_root_id).source_root(db).is_library
}
// FIXME: This is a weird function