diff options
author | Edwin Cheng <[email protected]> | 2021-01-19 08:58:11 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2021-01-19 08:58:11 +0000 |
commit | 8b03b58ad77f90eb6184fdc5db18555bf69adab8 (patch) | |
tree | b29c930819be639e26972476e353bdb4c39db8cb /crates/ide/src/hover.rs | |
parent | fea81d4e52c3565bf8c85158edcf789acacf4534 (diff) |
Support runnables in macros
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 6022bd275..ac2d7727e 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs | |||
@@ -183,12 +183,7 @@ fn runnable_action( | |||
183 | ) -> Option<HoverAction> { | 183 | ) -> Option<HoverAction> { |
184 | match def { | 184 | match def { |
185 | Definition::ModuleDef(it) => match it { | 185 | Definition::ModuleDef(it) => match it { |
186 | ModuleDef::Module(it) => match it.definition_source(sema.db).value { | 186 | ModuleDef::Module(it) => runnable_mod(&sema, it).map(|it| HoverAction::Runnable(it)), |
187 | ModuleSource::Module(it) => { | ||
188 | runnable_mod(&sema, it).map(|it| HoverAction::Runnable(it)) | ||
189 | } | ||
190 | _ => None, | ||
191 | }, | ||
192 | ModuleDef::Function(func) => { | 187 | ModuleDef::Function(func) => { |
193 | let src = func.source(sema.db)?; | 188 | let src = func.source(sema.db)?; |
194 | if src.file_id != file_id.into() { | 189 | if src.file_id != file_id.into() { |