mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
use Source for module, part 2
This commit is contained in:
parent
0145d06515
commit
dd63f17027
3 changed files with 8 additions and 8 deletions
|
@ -71,7 +71,7 @@ pub(crate) fn documentation_query(
|
|||
def: DocDef,
|
||||
) -> Option<Documentation> {
|
||||
match def {
|
||||
DocDef::Module(it) => docs_from_ast(&*it.declaration_source(db)?.1),
|
||||
DocDef::Module(it) => docs_from_ast(&*it.declaration_source(db)?.ast),
|
||||
DocDef::StructField(it) => match it.source(db).ast {
|
||||
FieldSource::Named(named) => docs_from_ast(&*named),
|
||||
FieldSource::Pos(..) => return None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue