Skip to content

Commit 0a9b2ca

Browse files
committed
Remove TypeKind
1 parent f3ef4b2 commit 0a9b2ca

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

src/librustdoc/clean/types.rs

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,59 +1442,6 @@ crate enum PrimitiveType {
14421442
Never,
14431443
}
14441444

1445-
#[derive(Clone, PartialEq, Eq, Hash, Copy, Debug)]
1446-
crate enum TypeKind {
1447-
Enum,
1448-
Function,
1449-
Module,
1450-
Const,
1451-
Static,
1452-
Struct,
1453-
Union,
1454-
Trait,
1455-
Typedef,
1456-
Foreign,
1457-
Macro,
1458-
TraitAlias,
1459-
}
1460-
1461-
impl From<hir::def::DefKind> for TypeKind {
1462-
fn from(other: hir::def::DefKind) -> Self {
1463-
match other {
1464-
hir::def::DefKind::Enum => Self::Enum,
1465-
hir::def::DefKind::Fn => Self::Function,
1466-
hir::def::DefKind::Mod => Self::Module,
1467-
hir::def::DefKind::Const => Self::Const,
1468-
hir::def::DefKind::Static => Self::Static,
1469-
hir::def::DefKind::Struct => Self::Struct,
1470-
hir::def::DefKind::Union => Self::Union,
1471-
hir::def::DefKind::Trait => Self::Trait,
1472-
hir::def::DefKind::TyAlias => Self::Typedef,
1473-
hir::def::DefKind::TraitAlias => Self::TraitAlias,
1474-
hir::def::DefKind::Macro(_) => Self::Macro,
1475-
hir::def::DefKind::ForeignTy
1476-
| hir::def::DefKind::Variant
1477-
| hir::def::DefKind::AssocTy
1478-
| hir::def::DefKind::TyParam
1479-
| hir::def::DefKind::ConstParam
1480-
| hir::def::DefKind::Ctor(..)
1481-
| hir::def::DefKind::AssocFn
1482-
| hir::def::DefKind::AssocConst
1483-
| hir::def::DefKind::ExternCrate
1484-
| hir::def::DefKind::Use
1485-
| hir::def::DefKind::ForeignMod
1486-
| hir::def::DefKind::AnonConst
1487-
| hir::def::DefKind::OpaqueTy
1488-
| hir::def::DefKind::Field
1489-
| hir::def::DefKind::LifetimeParam
1490-
| hir::def::DefKind::GlobalAsm
1491-
| hir::def::DefKind::Impl
1492-
| hir::def::DefKind::Closure
1493-
| hir::def::DefKind::Generator => Self::Foreign,
1494-
}
1495-
}
1496-
}
1497-
14981445
crate trait GetDefId {
14991446
/// Use this method to get the [`DefId`] of a [`clean`] AST node.
15001447
/// This will return [`None`] when called on a primitive [`clean::Type`].

0 commit comments

Comments
 (0)