mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Merge #646
646: Add module documentation support r=matklad a=kjeremy Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
This commit is contained in:
commit
cc73d3ccbc
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 {
|
||||
pub(crate) parent: VariantDef,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue