aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir/src/code_model_api.rs2
-rw-r--r--crates/ra_hir/src/ty.rs5
2 files changed, 0 insertions, 7 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs
index 0a96d6f6d..a094268ca 100644
--- a/crates/ra_hir/src/code_model_api.rs
+++ b/crates/ra_hir/src/code_model_api.rs
@@ -47,8 +47,6 @@ impl Crate {
47 47
48#[derive(Debug)] 48#[derive(Debug)]
49pub enum Def { 49pub enum Def {
50 Struct(Struct),
51 Enum(Enum),
52 EnumVariant(EnumVariant), 50 EnumVariant(EnumVariant),
53 Const(Const), 51 Const(Const),
54 Static(Static), 52 Static(Static),
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs
index 6a5f4fae6..b81899661 100644
--- a/crates/ra_hir/src/ty.rs
+++ b/crates/ra_hir/src/ty.rs
@@ -745,7 +745,6 @@ pub(super) fn type_for_def(db: &impl HirDatabase, def: TypableDef) -> Ty {
745 TypableDef::Struct(s) => type_for_struct(db, s), 745 TypableDef::Struct(s) => type_for_struct(db, s),
746 TypableDef::Enum(e) => type_for_enum(db, e), 746 TypableDef::Enum(e) => type_for_enum(db, e),
747 TypableDef::Def(def_id) => match def_id.resolve(db) { 747 TypableDef::Def(def_id) => match def_id.resolve(db) {
748 Def::Enum(e) => type_for_enum(db, e),
749 Def::EnumVariant(ev) => type_for_enum_variant(db, ev), 748 Def::EnumVariant(ev) => type_for_enum_variant(db, ev),
750 _ => { 749 _ => {
751 log::debug!( 750 log::debug!(
@@ -787,10 +786,6 @@ pub(super) fn type_for_field(db: &impl HirDatabase, def: VariantDef, field: Name
787 def_id.module(db), 786 def_id.module(db),
788 ), 787 ),
789 // TODO: unions 788 // TODO: unions
790 Def::Enum(_) => {
791 // this can happen in (invalid) code, but enums don't have fields themselves
792 return None;
793 }
794 _ => panic!( 789 _ => panic!(
795 "trying to get type for field {:?} in non-struct/variant {:?}", 790 "trying to get type for field {:?} in non-struct/variant {:?}",
796 field, def_id 791 field, def_id