diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-19 09:27:45 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-19 09:27:45 +0000 |
commit | 8935106b395edf3a923b1be6f039a115a9f67144 (patch) | |
tree | 897ee6847892fc9ae7b5e271c40f424c1d37dac7 /crates/ide/src/hover.rs | |
parent | 08aa0bec956ee82a377831ef8c4f82fbe37b64bb (diff) | |
parent | 8b03b58ad77f90eb6184fdc5db18555bf69adab8 (diff) |
Merge #7321
7321: Support runnables in macros r=matklad a=edwin0cheng
fixes #4771
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ide/src/hover.rs')
-rw-r--r-- | crates/ide/src/hover.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 2024acd94..44ebdbd35 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -182,12 +182,7 @@ fn runnable_action( | |||
182 | ) -> Option<HoverAction> { | 182 | ) -> Option<HoverAction> { |
183 | match def { | 183 | match def { |
184 | Definition::ModuleDef(it) => match it { | 184 | Definition::ModuleDef(it) => match it { |
185 | ModuleDef::Module(it) => match it.definition_source(sema.db).value { | 185 | ModuleDef::Module(it) => runnable_mod(&sema, it).map(|it| HoverAction::Runnable(it)), |
186 | ModuleSource::Module(it) => { | ||
187 | runnable_mod(&sema, it).map(|it| HoverAction::Runnable(it)) | ||
188 | } | ||
189 | _ => None, | ||
190 | }, | ||
191 | ModuleDef::Function(func) => { | 186 | ModuleDef::Function(func) => { |
192 | let src = func.source(sema.db)?; | 187 | let src = func.source(sema.db)?; |
193 | if src.file_id != file_id.into() { | 188 | if src.file_id != file_id.into() { |