From e3cda83f90a5e64ccf288438466e6c447df253a8 Mon Sep 17 00:00:00 2001 From: Kevin DeLorey <2295721+kdelorey@users.noreply.github.com> Date: Wed, 22 Jan 2020 22:25:41 -0600 Subject: Added basic support for completing `fn` for trait impl. --- crates/ra_ide/src/completion.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_ide/src/completion.rs') diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index abe1f36ce..f31f2593c 100644 --- a/crates/ra_ide/src/completion.rs +++ b/crates/ra_ide/src/completion.rs @@ -15,6 +15,7 @@ mod complete_path; mod complete_scope; mod complete_postfix; mod complete_macro_in_item_position; +mod complete_impl_fn; use ra_db::SourceDatabase; @@ -73,5 +74,7 @@ pub(crate) fn completions(db: &db::RootDatabase, position: FilePosition) -> Opti complete_pattern::complete_pattern(&mut acc, &ctx); complete_postfix::complete_postfix(&mut acc, &ctx); complete_macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx); + complete_impl_fn::complete_impl_fn(&mut acc, &ctx); + Some(acc) } -- cgit v1.2.3 From bc1fc6239d67708112f4f3997b104934dd11b7fd Mon Sep 17 00:00:00 2001 From: Kevin DeLorey <2295721+kdelorey@users.noreply.github.com> Date: Wed, 22 Jan 2020 22:38:03 -0600 Subject: Renamed the trait completion mod. --- crates/ra_ide/src/completion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/completion.rs') diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index f31f2593c..ad7f6ef26 100644 --- a/crates/ra_ide/src/completion.rs +++ b/crates/ra_ide/src/completion.rs @@ -15,7 +15,7 @@ mod complete_path; mod complete_scope; mod complete_postfix; mod complete_macro_in_item_position; -mod complete_impl_fn; +mod complete_trait_impl; use ra_db::SourceDatabase; @@ -74,7 +74,7 @@ pub(crate) fn completions(db: &db::RootDatabase, position: FilePosition) -> Opti complete_pattern::complete_pattern(&mut acc, &ctx); complete_postfix::complete_postfix(&mut acc, &ctx); complete_macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx); - complete_impl_fn::complete_impl_fn(&mut acc, &ctx); + complete_trait_impl::complete_trait_impl(&mut acc, &ctx); Some(acc) } -- cgit v1.2.3 From d85abd77b98ff5925621c18f2ffe121640d17c80 Mon Sep 17 00:00:00 2001 From: Kevin DeLorey <2295721+kdelorey@users.noreply.github.com> Date: Sun, 9 Feb 2020 12:24:34 -0600 Subject: Added a utility function that can be used to determine the missing impl items. --- crates/ra_ide/src/completion.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src/completion.rs') diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs index 4f24cd1f9..4bdc6ba23 100644 --- a/crates/ra_ide/src/completion.rs +++ b/crates/ra_ide/src/completion.rs @@ -76,6 +76,6 @@ pub(crate) fn completions(db: &RootDatabase, position: FilePosition) -> Option