Add dummy impls for trace_macros and log_syntax

This commit is contained in:
Lukas Wirth 2021-10-26 20:52:38 +02:00
parent 142b6dc650
commit 54e6583f53
2 changed files with 37 additions and 17 deletions

View File

@ -113,6 +113,8 @@ pub fn find_builtin_macro(
(cfg, Cfg) => cfg_expand,
(core_panic, CorePanic) => panic_expand,
(std_panic, StdPanic) => panic_expand,
(log_syntax, LogSyntax) => log_syntax_expand,
(trace_macros, TraceMacros) => trace_macros_expand,
EAGER:
(compile_error, CompileError) => compile_error_expand,
@ -148,6 +150,22 @@ fn line_expand(
ExpandResult::ok(expanded)
}
fn log_syntax_expand(
_db: &dyn AstDatabase,
_id: MacroCallId,
_tt: &tt::Subtree,
) -> ExpandResult<tt::Subtree> {
ExpandResult::ok(quote! {})
}
fn trace_macros_expand(
_db: &dyn AstDatabase,
_id: MacroCallId,
_tt: &tt::Subtree,
) -> ExpandResult<tt::Subtree> {
ExpandResult::ok(quote! {})
}
fn stringify_expand(
_db: &dyn AstDatabase,
_id: MacroCallId,

View File

@ -226,28 +226,30 @@ macro_rules! known_names {
len,
is_empty,
// Builtin macros
file,
column,
const_format_args,
compile_error,
line,
module_path,
asm,
assert,
core_panic,
std_panic,
stringify,
concat,
column,
compile_error,
concat_idents,
include,
concat,
const_format_args,
core_panic,
env,
file,
format_args_nl,
format_args,
global_asm,
include_bytes,
include_str,
format_args,
format_args_nl,
env,
option_env,
include,
line,
llvm_asm,
asm,
global_asm,
log_syntax,
module_path,
option_env,
std_panic,
stringify,
trace_macros,
// Builtin derives
Copy,
Clone,