-
Notifications
You must be signed in to change notification settings - Fork 13.3k
diagnostics: hide expansion of builtin-like macros #141314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
r? @nnethercote rustbot has assigned @nnethercote. Use |
This comment has been minimized.
This comment has been minimized.
compiler/rustc_errors/src/emitter.rs
Outdated
|| aiu.contains(&sym::print_internals) | ||
|| aiu.contains(&sym::liballoc_internals) | ||
}), | ||
)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth pulling everything after the first ||
out into a separate variable.
Also, I don't really understand how this works, i.e. how allow_internal_unstable
is involved. A brief comment explaining it would be useful.
Generally looks good, I will r+ once the tests all pass the the suggestion above is addressed. Thanks. @rustbot author |
Reminder, once the PR becomes ready for a review, use |
@@ -193,16 +193,12 @@ error: asm template must be a string literal | |||
| | |||
LL | asm!(format!("{{{}}}", 0), in(reg) foo); | |||
| ^^^^^^^^^^^^^^^^^^^^ | |||
| | |||
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does -Zmacro-backtrace
still work for builtin-like macros with this PR?
I just recently rejected this change in #138379. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
As of late I've gotten more and more annoyed by notes like
note: this error originates in the macro $crate::__export::format_args
.This PR hides that message if it comes from an expansion of a macro that uses features like
fmt_internals
. If its expansion is an implementation detail we shouldn't be mentioning it. This covers macros likevec!
,format!
and so on, but not the more mundane ones likeassert_eq!
andtodo!!