mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Remove unused Definition::docs
This commit is contained in:
parent
bb56b7a75c
commit
c43359b64e
1 changed files with 0 additions and 23 deletions
|
@ -79,29 +79,6 @@ impl Definition {
|
||||||
};
|
};
|
||||||
Some(name)
|
Some(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn docs(&self, db: &RootDatabase) -> Option<hir::Documentation> {
|
|
||||||
match self {
|
|
||||||
Definition::Macro(it) => it.docs(db),
|
|
||||||
Definition::Field(it) => it.docs(db),
|
|
||||||
Definition::ModuleDef(def) => match def {
|
|
||||||
hir::ModuleDef::Module(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::Function(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::Adt(def) => match def {
|
|
||||||
hir::Adt::Struct(it) => it.docs(db),
|
|
||||||
hir::Adt::Union(it) => it.docs(db),
|
|
||||||
hir::Adt::Enum(it) => it.docs(db),
|
|
||||||
},
|
|
||||||
hir::ModuleDef::Variant(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::Const(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::Static(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::Trait(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::TypeAlias(it) => it.docs(db),
|
|
||||||
hir::ModuleDef::BuiltinType(_) => None,
|
|
||||||
},
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue