Do not suggest using -Zmacro-backtrace for builtin macros

For macros that are implemented on the compiler, we do *not* mention the `-Zmacro-backtrace` flag. This includes `derive`s and standard macros.
This commit is contained in:
Esteban Küber 2025-03-11 23:42:36 +00:00
parent f7b4354283
commit f0b8e13b59
205 changed files with 27 additions and 495 deletions

View file

@ -982,6 +982,8 @@ pub struct ExpnData {
/// Should debuginfo for the macro be collapsed to the outermost expansion site (in other
/// words, was the macro definition annotated with `#[collapse_debuginfo]`)?
pub(crate) collapse_debuginfo: bool,
/// When true, we do not display the note telling people to use the `-Zmacro-backtrace` flag.
pub hide_backtrace: bool,
}
impl !PartialEq for ExpnData {}
@ -1000,6 +1002,7 @@ impl ExpnData {
allow_internal_unsafe: bool,
local_inner_macros: bool,
collapse_debuginfo: bool,
hide_backtrace: bool,
) -> ExpnData {
ExpnData {
kind,
@ -1014,6 +1017,7 @@ impl ExpnData {
allow_internal_unsafe,
local_inner_macros,
collapse_debuginfo,
hide_backtrace,
}
}
@ -1038,6 +1042,7 @@ impl ExpnData {
allow_internal_unsafe: false,
local_inner_macros: false,
collapse_debuginfo: false,
hide_backtrace: false,
}
}