Remove unused Definition::docs

This commit is contained in:
Lukas Wirth 2021-03-30 18:30:42 +02:00
parent bb56b7a75c
commit c43359b64e

View file

@ -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)]