aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-29 23:48:04 +0100
committerGitHub <[email protected]>2020-07-29 23:48:04 +0100
commit9da454bcc2386e2782b71a9756b77a7763fd544b (patch)
tree72dc1cdc67d1cef8024b88cc05955ade68d917e2 /crates/ra_ide/src
parent4567ae575e15cdb9af39b68b1490c062762ec39e (diff)
parentede5d17b0409f9d5a209aaf16508262dbd2a4489 (diff)
Merge #5578
5578: Rename ModuleItem -> Item r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/completion/complete_fn_param.rs2
-rw-r--r--crates/ra_ide/src/runnables.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide/src/completion/complete_fn_param.rs b/crates/ra_ide/src/completion/complete_fn_param.rs
index db2abb4f1..7a53083f5 100644
--- a/crates/ra_ide/src/completion/complete_fn_param.rs
+++ b/crates/ra_ide/src/completion/complete_fn_param.rs
@@ -28,7 +28,7 @@ pub(super) fn complete_fn_param(acc: &mut Completions, ctx: &CompletionContext)
28 } 28 }
29 }; 29 };
30 for item in items { 30 for item in items {
31 if let ast::ModuleItem::FnDef(func) = item { 31 if let ast::Item::FnDef(func) = item {
32 if Some(&func) == me.as_ref() { 32 if Some(&func) == me.as_ref() {
33 continue; 33 continue;
34 } 34 }
diff --git a/crates/ra_ide/src/runnables.rs b/crates/ra_ide/src/runnables.rs
index 45e0a7d85..f612835c2 100644
--- a/crates/ra_ide/src/runnables.rs
+++ b/crates/ra_ide/src/runnables.rs
@@ -246,12 +246,12 @@ fn has_test_function_or_multiple_test_submodules(module: &ast::Module) -> bool {
246 246
247 for item in item_list.items() { 247 for item in item_list.items() {
248 match item { 248 match item {
249 ast::ModuleItem::FnDef(f) => { 249 ast::Item::FnDef(f) => {
250 if has_test_related_attribute(&f) { 250 if has_test_related_attribute(&f) {
251 return true; 251 return true;
252 } 252 }
253 } 253 }
254 ast::ModuleItem::Module(submodule) => { 254 ast::Item::Module(submodule) => {
255 if has_test_function_or_multiple_test_submodules(&submodule) { 255 if has_test_function_or_multiple_test_submodules(&submodule) {
256 number_of_test_submodules += 1; 256 number_of_test_submodules += 1;
257 } 257 }