File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ register_builtin! {
8888 ( column, Column ) => column_expand,
8989 ( file, File ) => file_expand,
9090 ( line, Line ) => line_expand,
91+ ( module_path, ModulePath ) => module_path_expand,
9192 ( assert, Assert ) => assert_expand,
9293 ( stringify, Stringify ) => stringify_expand,
9394 ( format_args, FormatArgs ) => format_args_expand,
@@ -105,6 +106,15 @@ register_builtin! {
105106 ( option_env, OptionEnv ) => option_env_expand
106107}
107108
109+ fn module_path_expand (
110+ _db : & dyn AstDatabase ,
111+ _id : LazyMacroId ,
112+ _tt : & tt:: Subtree ,
113+ ) -> ExpandResult < tt:: Subtree > {
114+ // Just return a dummy result.
115+ ExpandResult :: ok ( quote ! { "module::path" } )
116+ }
117+
108118fn line_expand (
109119 _db : & dyn AstDatabase ,
110120 _id : LazyMacroId ,
Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ pub mod known {
188188 column,
189189 compile_error,
190190 line,
191+ module_path,
191192 assert,
192193 stringify,
193194 concat,
You can’t perform that action at this time.
0 commit comments