4 // Whether an item exists in the type or value namespace.
5 #[derive(Copy, Clone, PartialEq, Eq, Debug)]
11 impl From<ty::AssocKind> for Namespace {
12 fn from(a_kind: ty::AssocKind) -> Self {
14 ty::AssocKind::Existential |
15 ty::AssocKind::Type => Namespace::Type,
16 ty::AssocKind::Const |
17 ty::AssocKind::Method => Namespace::Value,
22 impl<'a> From <&'a hir::ImplItemKind> for Namespace {
23 fn from(impl_kind: &'a hir::ImplItemKind) -> Self {
25 hir::ImplItemKind::Existential(..) |
26 hir::ImplItemKind::Type(..) => Namespace::Type,
27 hir::ImplItemKind::Const(..) |
28 hir::ImplItemKind::Method(..) => Namespace::Value,