This commit is contained in:
Lukas Wirth 2021-08-14 18:02:51 +02:00
parent 37ad9cb2a5
commit 894a09b749
3 changed files with 6 additions and 15 deletions

View file

@ -70,14 +70,8 @@ pub(crate) fn annotations(
hir::ModuleDef::Trait(trait_) => {
trait_.source(db).and_then(|node| name_range(&node, file_id))
}
hir::ModuleDef::Adt(hir::Adt::Struct(strukt)) => {
strukt.source(db).and_then(|node| name_range(&node, file_id))
}
hir::ModuleDef::Adt(hir::Adt::Enum(enum_)) => {
enum_.source(db).and_then(|node| name_range(&node, file_id))
}
hir::ModuleDef::Adt(hir::Adt::Union(union)) => {
union.source(db).and_then(|node| name_range(&node, file_id))
hir::ModuleDef::Adt(adt) => {
adt.source(db).and_then(|node| name_range(&node, file_id))
}
_ => None,
};