Add a bunch of new documentation to completions
This commit is contained in:
@@ -394,6 +394,12 @@ impl Const {
|
||||
}
|
||||
}
|
||||
|
||||
impl Docs for Const {
|
||||
fn docs(&self, db: &impl HirDatabase) -> Option<Documentation> {
|
||||
docs_from_ast(&*self.source(db).1)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Static {
|
||||
pub(crate) def_id: DefId,
|
||||
@@ -409,6 +415,12 @@ impl Static {
|
||||
}
|
||||
}
|
||||
|
||||
impl Docs for Static {
|
||||
fn docs(&self, db: &impl HirDatabase) -> Option<Documentation> {
|
||||
docs_from_ast(&*self.source(db).1)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Trait {
|
||||
pub(crate) def_id: DefId,
|
||||
@@ -428,6 +440,12 @@ impl Trait {
|
||||
}
|
||||
}
|
||||
|
||||
impl Docs for Trait {
|
||||
fn docs(&self, db: &impl HirDatabase) -> Option<Documentation> {
|
||||
docs_from_ast(&*self.source(db).1)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Type {
|
||||
pub(crate) def_id: DefId,
|
||||
@@ -446,3 +464,9 @@ impl Type {
|
||||
db.generic_params(self.def_id)
|
||||
}
|
||||
}
|
||||
|
||||
impl Docs for Type {
|
||||
fn docs(&self, db: &impl HirDatabase) -> Option<Documentation> {
|
||||
docs_from_ast(&*self.source(db).1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user