Skip to content

Commit 2df886d

Browse files
committed
Remove TypeKind
1 parent 3170536 commit 2df886d

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
@@ -1315,59 +1315,6 @@ crate enum PrimitiveType {
13151315
Never,
13161316
}
13171317

1318-
#[derive(Clone, PartialEq, Eq, Hash, Copy, Debug)]
1319-
crate enum TypeKind {
1320-
Enum,
1321-
Function,
1322-
Module,
1323-
Const,
1324-
Static,
1325-
Struct,
1326-
Union,
1327-
Trait,
1328-
Typedef,
1329-
Foreign,
1330-
Macro,
1331-
TraitAlias,
1332-
}
1333-
1334-
impl From<hir::def::DefKind> for TypeKind {
1335-
fn from(other: hir::def::DefKind) -> Self {
1336-
match other {
1337-
hir::def::DefKind::Enum => Self::Enum,
1338-
hir::def::DefKind::Fn => Self::Function,
1339-
hir::def::DefKind::Mod => Self::Module,
1340-
hir::def::DefKind::Const => Self::Const,
1341-
hir::def::DefKind::Static => Self::Static,
1342-
hir::def::DefKind::Struct => Self::Struct,
1343-
hir::def::DefKind::Union => Self::Union,
1344-
hir::def::DefKind::Trait => Self::Trait,
1345-
hir::def::DefKind::TyAlias => Self::Typedef,
1346-
hir::def::DefKind::TraitAlias => Self::TraitAlias,
1347-
hir::def::DefKind::Macro(_) => Self::Macro,
1348-
hir::def::DefKind::ForeignTy
1349-
| hir::def::DefKind::Variant
1350-
| hir::def::DefKind::AssocTy
1351-
| hir::def::DefKind::TyParam
1352-
| hir::def::DefKind::ConstParam
1353-
| hir::def::DefKind::Ctor(..)
1354-
| hir::def::DefKind::AssocFn
1355-
| hir::def::DefKind::AssocConst
1356-
| hir::def::DefKind::ExternCrate
1357-
| hir::def::DefKind::Use
1358-
| hir::def::DefKind::ForeignMod
1359-
| hir::def::DefKind::AnonConst
1360-
| hir::def::DefKind::OpaqueTy
1361-
| hir::def::DefKind::Field
1362-
| hir::def::DefKind::LifetimeParam
1363-
| hir::def::DefKind::GlobalAsm
1364-
| hir::def::DefKind::Impl
1365-
| hir::def::DefKind::Closure
1366-
| hir::def::DefKind::Generator => Self::Foreign,
1367-
}
1368-
}
1369-
}
1370-
13711318
crate trait GetDefId {
13721319
/// Use this method to get the [`DefId`] of a [`clean`] AST node.
13731320
/// This will return [`None`] when called on a primitive [`clean::Type`].

0 commit comments

Comments
 (0)