diff --git a/crates/hir_expand/src/builtin_macro.rs b/crates/hir_expand/src/builtin_macro.rs
index 477192a09cd..8db8c7d0c02 100644
--- a/crates/hir_expand/src/builtin_macro.rs
+++ b/crates/hir_expand/src/builtin_macro.rs
@@ -88,6 +88,7 @@ register_builtin! {
     (column, Column) => column_expand,
     (file, File) => file_expand,
     (line, Line) => line_expand,
+    (module_path, ModulePath) => module_path_expand,
     (assert, Assert) => assert_expand,
     (stringify, Stringify) => stringify_expand,
     (format_args, FormatArgs) => format_args_expand,
@@ -105,6 +106,15 @@ register_builtin! {
     (option_env, OptionEnv) => option_env_expand
 }
 
+fn module_path_expand(
+    _db: &dyn AstDatabase,
+    _id: LazyMacroId,
+    _tt: &tt::Subtree,
+) -> ExpandResult<tt::Subtree> {
+    // Just return a dummy result.
+    ExpandResult::ok(quote! { "module::path" })
+}
+
 fn line_expand(
     _db: &dyn AstDatabase,
     _id: LazyMacroId,
diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs
index 583ed6142bc..6ec5ca0a97e 100644
--- a/crates/hir_expand/src/name.rs
+++ b/crates/hir_expand/src/name.rs
@@ -188,6 +188,7 @@ pub mod known {
         column,
         compile_error,
         line,
+        module_path,
         assert,
         stringify,
         concat,