diff --git a/crates/ra_hir/src/code_model/src.rs b/crates/ra_hir/src/code_model/src.rs
index c4e62f7993f..6d116ee75c9 100644
--- a/crates/ra_hir/src/code_model/src.rs
+++ b/crates/ra_hir/src/code_model/src.rs
@@ -6,8 +6,8 @@ use crate::{
     adt::VariantDef,
     db::{AstDatabase, DefDatabase, HirDatabase},
     ids::AstItemDef,
-    Const, Either, Enum, EnumVariant, FieldSource, Function, HasBody, HirFileId, MacroDef,
-    MacroDefId, Module, ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union,
+    Const, Either, Enum, EnumVariant, FieldSource, Function, HasBody, HirFileId, MacroDef, Module,
+    ModuleSource, Static, Struct, StructField, Trait, TypeAlias, Union,
 };
 
 pub use hir_expand::Source;
@@ -140,15 +140,10 @@ impl HasSource for TypeAlias {
         self.id.source(db)
     }
 }
-
 impl HasSource for MacroDef {
     type Ast = ast::MacroCall;
     fn source(self, db: &(impl DefDatabase + AstDatabase)) -> Source<ast::MacroCall> {
-        let ast_id = match self.id {
-            MacroDefId::DeclarativeMacro(it) => it.ast_id,
-            MacroDefId::BuiltinMacro(it) => it.ast_id,
-        };
-        Source { file_id: ast_id.file_id(), ast: ast_id.to_node(db) }
+        Source { file_id: self.id.ast_id.file_id(), ast: self.id.ast_id.to_node(db) }
     }
 }
 
diff --git a/crates/ra_hir_def/src/nameres/collector.rs b/crates/ra_hir_def/src/nameres/collector.rs
index 5f18e9de3b0..30664278e50 100644
--- a/crates/ra_hir_def/src/nameres/collector.rs
+++ b/crates/ra_hir_def/src/nameres/collector.rs
@@ -3,7 +3,7 @@
 use hir_expand::{
     builtin_macro::find_builtin_macro,
     name::{self, AsName, Name},
-    DeclarativeMacro, HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroFileKind,
+    HirFileId, MacroCallId, MacroCallLoc, MacroDefId, MacroDefKind, MacroFileKind,
 };
 use ra_cfg::CfgOptions;
 use ra_db::{CrateId, FileId};
@@ -708,13 +708,12 @@ where
         // Case 1: macro rules, define a macro in crate-global mutable scope
         if is_macro_rules(&mac.path) {
             if let Some(name) = &mac.name {
-                let macro_id = DeclarativeMacro { ast_id, krate: self.def_collector.def_map.krate };
-                self.def_collector.define_macro(
-                    self.module_id,
-                    name.clone(),
-                    MacroDefId::DeclarativeMacro(macro_id),
-                    mac.export,
-                );
+                let macro_id = MacroDefId {
+                    ast_id,
+                    krate: self.def_collector.def_map.krate,
+                    kind: MacroDefKind::Declarative,
+                };
+                self.def_collector.define_macro(self.module_id, name.clone(), macro_id, mac.export);
             }
             return;
         }
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs
index acb62da27bf..97fb0cb5521 100644
--- a/crates/ra_hir_expand/src/builtin_macro.rs
+++ b/crates/ra_hir_expand/src/builtin_macro.rs
@@ -2,7 +2,7 @@
 use crate::db::AstDatabase;
 use crate::{
     ast::{self, AstNode},
-    name, AstId, BuiltinMacro, CrateId, HirFileId, MacroCallId, MacroDefId, MacroFileKind,
+    name, AstId, CrateId, HirFileId, MacroCallId, MacroDefId, MacroDefKind, MacroFileKind,
     TextUnit,
 };
 
@@ -33,11 +33,7 @@ pub fn find_builtin_macro(
 ) -> Option<MacroDefId> {
     // FIXME: Better registering method
     if ident == &name::LINE_MACRO {
-        Some(MacroDefId::BuiltinMacro(BuiltinMacro {
-            expander: BuiltinExpander::Line,
-            krate,
-            ast_id,
-        }))
+        Some(MacroDefId { krate, ast_id, kind: MacroDefKind::BuiltIn(BuiltinExpander::Line) })
     } else {
         None
     }
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs
index 009ff53129c..5eadee9c28c 100644
--- a/crates/ra_hir_expand/src/db.rs
+++ b/crates/ra_hir_expand/src/db.rs
@@ -10,7 +10,7 @@ use ra_syntax::{AstNode, Parse, SyntaxNode};
 
 use crate::{
     ast_id_map::AstIdMap, BuiltinExpander, HirFileId, HirFileIdRepr, MacroCallId, MacroCallLoc,
-    MacroDefId, MacroFile, MacroFileKind,
+    MacroDefId, MacroDefKind, MacroFile, MacroFileKind,
 };
 
 #[derive(Debug, Clone, Eq, PartialEq)]
@@ -69,9 +69,9 @@ pub(crate) fn macro_def(
     db: &dyn AstDatabase,
     id: MacroDefId,
 ) -> Option<Arc<(TokenExpander, mbe::TokenMap)>> {
-    match id {
-        MacroDefId::DeclarativeMacro(it) => {
-            let macro_call = it.ast_id.to_node(db);
+    match id.kind {
+        MacroDefKind::Declarative => {
+            let macro_call = id.ast_id.to_node(db);
             let arg = macro_call.token_tree()?;
             let (tt, tmap) = mbe::ast_to_token_tree(&arg).or_else(|| {
                 log::warn!("fail on macro_def to token tree: {:#?}", arg);
@@ -83,8 +83,8 @@ pub(crate) fn macro_def(
             })?;
             Some(Arc::new((TokenExpander::MacroRules(rules), tmap)))
         }
-        MacroDefId::BuiltinMacro(it) => {
-            Some(Arc::new((TokenExpander::Builtin(it.expander.clone()), mbe::TokenMap::default())))
+        MacroDefKind::BuiltIn(expander) => {
+            Some(Arc::new((TokenExpander::Builtin(expander.clone()), mbe::TokenMap::default())))
         }
     }
 }
diff --git a/crates/ra_hir_expand/src/hygiene.rs b/crates/ra_hir_expand/src/hygiene.rs
index 6b682d3abd0..379562a2c14 100644
--- a/crates/ra_hir_expand/src/hygiene.rs
+++ b/crates/ra_hir_expand/src/hygiene.rs
@@ -9,7 +9,7 @@ use crate::{
     db::AstDatabase,
     either::Either,
     name::{AsName, Name},
-    HirFileId, HirFileIdRepr, MacroDefId,
+    HirFileId, HirFileIdRepr, MacroDefKind,
 };
 
 #[derive(Debug)]
@@ -24,9 +24,9 @@ impl Hygiene {
             HirFileIdRepr::FileId(_) => None,
             HirFileIdRepr::MacroFile(macro_file) => {
                 let loc = db.lookup_intern_macro(macro_file.macro_call_id);
-                match loc.def {
-                    MacroDefId::DeclarativeMacro(it) => Some(it.krate),
-                    MacroDefId::BuiltinMacro(_) => None,
+                match loc.def.kind {
+                    MacroDefKind::Declarative => Some(loc.def.krate),
+                    MacroDefKind::BuiltIn(_) => None,
                 }
             }
         };
diff --git a/crates/ra_hir_expand/src/lib.rs b/crates/ra_hir_expand/src/lib.rs
index 21d666f1315..c6ffa2c6f2f 100644
--- a/crates/ra_hir_expand/src/lib.rs
+++ b/crates/ra_hir_expand/src/lib.rs
@@ -78,15 +78,9 @@ impl HirFileId {
             HirFileIdRepr::MacroFile(macro_file) => {
                 let loc: MacroCallLoc = db.lookup_intern_macro(macro_file.macro_call_id);
 
-                // FIXME: Do we support expansion information in builtin macro?
-                let macro_decl = match loc.def {
-                    MacroDefId::DeclarativeMacro(it) => (it),
-                    MacroDefId::BuiltinMacro(_) => return None,
-                };
-
                 let arg_start = loc.ast_id.to_node(db).token_tree()?.syntax().text_range().start();
                 let def_start =
-                    macro_decl.ast_id.to_node(db).token_tree()?.syntax().text_range().start();
+                    loc.def.ast_id.to_node(db).token_tree()?.syntax().text_range().start();
 
                 let macro_def = db.macro_def(loc.def)?;
                 let shift = macro_def.0.shift();
@@ -94,7 +88,7 @@ impl HirFileId {
                 let macro_arg = db.macro_arg(macro_file.macro_call_id)?;
 
                 let arg_start = (loc.ast_id.file_id, arg_start);
-                let def_start = (macro_decl.ast_id.file_id, def_start);
+                let def_start = (loc.def.ast_id.file_id, def_start);
 
                 Some(ExpansionInfo { arg_start, def_start, macro_arg, macro_def, exp_map, shift })
             }
@@ -128,22 +122,16 @@ impl salsa::InternKey for MacroCallId {
 }
 
 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
-pub enum MacroDefId {
-    DeclarativeMacro(DeclarativeMacro),
-    BuiltinMacro(BuiltinMacro),
+pub struct MacroDefId {
+    pub krate: CrateId,
+    pub ast_id: AstId<ast::MacroCall>,
+    pub kind: MacroDefKind,
 }
 
 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
-pub struct DeclarativeMacro {
-    pub krate: CrateId,
-    pub ast_id: AstId<ast::MacroCall>,
-}
-
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
-pub struct BuiltinMacro {
-    pub krate: CrateId,
-    pub ast_id: AstId<ast::MacroCall>,
-    pub expander: BuiltinExpander,
+pub enum MacroDefKind {
+    Declarative,
+    BuiltIn(BuiltinExpander),
 }
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]