mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add module documentation support
This commit is contained in:
parent
bce0c6267a
commit
6588579116
4 changed files with 50 additions and 1 deletions
|
@ -177,6 +177,13 @@ impl Module {
|
|||
}
|
||||
}
|
||||
|
||||
impl Docs for Module {
|
||||
fn docs(&self, db: &impl HirDatabase) -> Option<Documentation> {
|
||||
self.declaration_source(db)
|
||||
.and_then(|it| docs_from_ast(&*it.1))
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct StructField {
|
||||
parent: VariantDef,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue