From 91f28e43a2686d0ac06f73b5fed11351aad428a9 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 8 Dec 2019 09:26:17 +0100 Subject: Fix expansion of format_args --- crates/ra_ide/src/goto_definition.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 1b968134d..077b0beda 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs @@ -693,7 +693,6 @@ mod tests { ); } - #[should_panic] // currently failing because of expr mapping problems #[test] fn goto_through_format() { check_goto( -- cgit v1.2.3 From 2223620313e94deb04d1565a75004579aa1a9e07 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 8 Dec 2019 11:22:39 +0100 Subject: Fix range in goto_through_format test --- crates/ra_ide/src/goto_definition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 077b0beda..b93d6a931 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs @@ -717,7 +717,7 @@ mod tests { format!(\"{}\", fo<|>o()) } ", - "foo FN_DEF FileId(1) [359; 376) [362; 365)", + "foo FN_DEF FileId(1) [398; 415) [401; 404)", ); } -- cgit v1.2.3 From a1639d0d1ef201b2b9a425eddecfb41a25f10931 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 8 Dec 2019 12:58:43 +0100 Subject: Remove more dead code --- crates/ra_ide/src/db.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/db.rs b/crates/ra_ide/src/db.rs index f739ebecd..47d0aed6f 100644 --- a/crates/ra_ide/src/db.rs +++ b/crates/ra_ide/src/db.rs @@ -5,7 +5,7 @@ use std::sync::Arc; use ra_db::{ salsa::{self, Database, Durability}, Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath, - SourceDatabase, SourceDatabaseExt, SourceRootId, + SourceDatabase, SourceRootId, }; use rustc_hash::FxHashMap; @@ -49,18 +49,6 @@ impl FileLoader for RootDatabase { } } -impl hir::debug::HirDebugHelper for RootDatabase { - fn crate_name(&self, krate: CrateId) -> Option { - self.debug_data.crate_names.get(&krate).cloned() - } - fn file_path(&self, file_id: FileId) -> Option { - let source_root_id = self.file_source_root(file_id); - let source_root_path = self.debug_data.root_paths.get(&source_root_id)?; - let file_path = self.file_relative_path(file_id); - Some(format!("{}/{}", source_root_path, file_path)) - } -} - impl salsa::Database for RootDatabase { fn salsa_runtime(&self) -> &salsa::Runtime { &self.runtime -- cgit v1.2.3 From 61c3887b70820283cb759127e3aecf7cbdbdc8c1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 8 Dec 2019 17:50:43 +0100 Subject: Remove one more Ty --- crates/ra_ide/src/completion/complete_dot.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/completion/complete_dot.rs b/crates/ra_ide/src/completion/complete_dot.rs index a52eb0ee4..294964887 100644 --- a/crates/ra_ide/src/completion/complete_dot.rs +++ b/crates/ra_ide/src/completion/complete_dot.rs @@ -27,7 +27,7 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) { complete_methods(acc, ctx, &receiver_ty); // Suggest .await syntax for types that implement Future trait - if ctx.analyzer.impls_future(ctx.db, receiver_ty.into_ty()) { + if ctx.analyzer.impls_future(ctx.db, receiver_ty) { CompletionItem::new(CompletionKind::Keyword, ctx.source_range(), "await") .detail("expr.await") .insert_text("await") -- cgit v1.2.3