aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/lib.rs
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-05-21 09:53:29 +0100
committerBenjamin Coenen <[email protected]>2020-05-21 09:53:29 +0100
commita7c8aa7c60c05db66ba4e89ae9e05c82e62507a5 (patch)
treee848f47bdf5d031c408df94222f595d2efcb2070 /crates/ra_ide/src/lib.rs
parentc6143742bd4e625d391ac3ea860be7578ab9f53f (diff)
parenta4e6963a2313971fe7bbec97d03bc67266ef68a9 (diff)
add support of feature flag for runnables #4464
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r--crates/ra_ide/src/lib.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index 78149ddfc..83cb498f7 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -43,8 +43,6 @@ mod expand_macro;
43mod ssr; 43mod ssr;
44 44
45#[cfg(test)] 45#[cfg(test)]
46mod marks;
47#[cfg(test)]
48mod test_utils; 46mod test_utils;
49 47
50use std::sync::Arc; 48use std::sync::Arc;
@@ -82,7 +80,7 @@ pub use crate::{
82}; 80};
83 81
84pub use hir::Documentation; 82pub use hir::Documentation;
85pub use ra_assists::AssistId; 83pub use ra_assists::{AssistConfig, AssistId};
86pub use ra_db::{ 84pub use ra_db::{
87 Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRootId, 85 Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRootId,
88}; 86};
@@ -458,17 +456,17 @@ impl Analysis {
458 /// Computes completions at the given position. 456 /// Computes completions at the given position.
459 pub fn completions( 457 pub fn completions(
460 &self, 458 &self,
461 position: FilePosition,
462 config: &CompletionConfig, 459 config: &CompletionConfig,
460 position: FilePosition,
463 ) -> Cancelable<Option<Vec<CompletionItem>>> { 461 ) -> Cancelable<Option<Vec<CompletionItem>>> {
464 self.with_db(|db| completion::completions(db, position, config).map(Into::into)) 462 self.with_db(|db| completion::completions(db, config, position).map(Into::into))
465 } 463 }
466 464
467 /// Computes assists (aka code actions aka intentions) for the given 465 /// Computes assists (aka code actions aka intentions) for the given
468 /// position. 466 /// position.
469 pub fn assists(&self, frange: FileRange) -> Cancelable<Vec<Assist>> { 467 pub fn assists(&self, config: &AssistConfig, frange: FileRange) -> Cancelable<Vec<Assist>> {
470 self.with_db(|db| { 468 self.with_db(|db| {
471 ra_assists::Assist::resolved(db, frange) 469 ra_assists::Assist::resolved(db, config, frange)
472 .into_iter() 470 .into_iter()
473 .map(|assist| Assist { 471 .map(|assist| Assist {
474 id: assist.assist.id, 472 id: assist.assist.id,