rustbot · GitHub

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Jun 30, 2026

JonathanBrouwer

JonathanBrouwer

@rustbot rustbot added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Jun 30, 2026

bjorn3

@mejrs

@mejrs

@mejrs

@mejrs mejrs mentioned this pull request

Jul 5, 2026

Open

7 tasks

@mejrs

@mejrs

@mejrs

@rust-bors rust-bors Bot added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Jul 14, 2026

Merged

rust-bors Bot pushed a commit that referenced this pull request

Jul 15, 2026
Rollup of 15 pull requests
Successful merges:
 - #159311 (Add 1.97.1 release notes)
 - #156220 (Implement `VecDeque::truncate_to_range`)
 - #158608 (Implement `#[diagnostic::opaque]` attribute to hide backtraces of macros.)
 - #159168 (Fix static_mut_refs lint check logic)
 - #159242 (resolve: Inherit eager invocation parents)
 - #159256 (Account for async closures when pointing at lifetime in return type)
 - #159310 (cleanup: upstream dropped AMX-TF32)
 - #158348 (Add documentation for the `inline` attribute)
 - #159181 (add rustc_no_writable to mem::forget and structs it uses)
 - #159191 (Mark `PrivateItems` with `std_internals` unstable feature.)
 - #159194 (rustdoc: Fix auto trait normalization env)
 - #159196 (OnceCell: Improve wording in module docs)
 - #159289 (Fix Zulip backport command suggestion)
 - #159294 (renovate: don't update PRs in the merge queue)
 - #159305 (std: clarify available_parallelism docs for Windows 11 processor groups)

@rust-bors

rust-timer added a commit that referenced this pull request

Jul 15, 2026

pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request

Jul 16, 2026

Merged

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request

Jul 18, 2026
…ros, r=mejrs
Apply `#[diagnostic::opaque]` to macros expanding to built-in syntax
For context, thin wrapper macros expanding to built-in syntax `builtin # SYNTAX(…)` (internal feature `builtin_syntax`) is an alternative to built-in macros (`#[rustc_builtin_macro]`) for introducing new syntax constructs that takes slightly less code to implement in the compiler (since one doesn't need to write boiler-plate expanders, see RUST-122806 for example).
However, one disadvantage of that approach is the fact that the thin wrapper macro is a normal macro and is thus considered "interesting" wrt. macro backtraces. The fact that it expands to `builtin # SYNTAX(…)` should be considered an implementation detail and thus these macros should be considered opaque.
I've applied `#[diagnostic::opaque]` (rust-lang#158608) to all of these macros which successfully suppresses diagnostic notes of the form `` this error originates in the macro `SYNTAX` (…) ``. Well, it doesn't actually omit the expansion from the macro backtrace when `-Zmacro-backtrace` is passed which was surprising but seems intentional looking at the linked PR. Still, this is better than nothing.
r? @mejrs

rust-timer added a commit that referenced this pull request

Jul 19, 2026
Rollup merge of #159522 - fmease:opaquify-builtin-syntax-macros, r=mejrs
Apply `#[diagnostic::opaque]` to macros expanding to built-in syntax
For context, thin wrapper macros expanding to built-in syntax `builtin # SYNTAX(…)` (internal feature `builtin_syntax`) is an alternative to built-in macros (`#[rustc_builtin_macro]`) for introducing new syntax constructs that takes slightly less code to implement in the compiler (since one doesn't need to write boiler-plate expanders, see RUST-122806 for example).
However, one disadvantage of that approach is the fact that the thin wrapper macro is a normal macro and is thus considered "interesting" wrt. macro backtraces. The fact that it expands to `builtin # SYNTAX(…)` should be considered an implementation detail and thus these macros should be considered opaque.
I've applied `#[diagnostic::opaque]` (#158608) to all of these macros which successfully suppresses diagnostic notes of the form `` this error originates in the macro `SYNTAX` (…) ``. Well, it doesn't actually omit the expansion from the macro backtrace when `-Zmacro-backtrace` is passed which was surprising but seems intentional looking at the linked PR. Still, this is better than nothing.
r? @mejrs

pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request

Jul 19, 2026
Apply `#[diagnostic::opaque]` to macros expanding to built-in syntax
For context, thin wrapper macros expanding to built-in syntax `builtin # SYNTAX(…)` (internal feature `builtin_syntax`) is an alternative to built-in macros (`#[rustc_builtin_macro]`) for introducing new syntax constructs that takes slightly less code to implement in the compiler (since one doesn't need to write boiler-plate expanders, see RUST-122806 for example).
However, one disadvantage of that approach is the fact that the thin wrapper macro is a normal macro and is thus considered "interesting" wrt. macro backtraces. The fact that it expands to `builtin # SYNTAX(…)` should be considered an implementation detail and thus these macros should be considered opaque.
I've applied `#[diagnostic::opaque]` (rust-lang/rust#158608) to all of these macros which successfully suppresses diagnostic notes of the form `` this error originates in the macro `SYNTAX` (…) ``. Well, it doesn't actually omit the expansion from the macro backtrace when `-Zmacro-backtrace` is passed which was surprising but seems intentional looking at the linked PR. Still, this is better than nothing.
r? @mejrs

@lcnr lcnr added the relnotes

Marks issues that should be documented in the release notes of the next release.

label

Jul 24, 2026

Closed

@mejrs mejrs removed the relnotes

Marks issues that should be documented in the release notes of the next release.

label

Jul 31, 2026

github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request

Aug 6, 2026
Apply `#[diagnostic::opaque]` to macros expanding to built-in syntax
For context, thin wrapper macros expanding to built-in syntax `builtin # SYNTAX(…)` (internal feature `builtin_syntax`) is an alternative to built-in macros (`#[rustc_builtin_macro]`) for introducing new syntax constructs that takes slightly less code to implement in the compiler (since one doesn't need to write boiler-plate expanders, see RUST-122806 for example).
However, one disadvantage of that approach is the fact that the thin wrapper macro is a normal macro and is thus considered "interesting" wrt. macro backtraces. The fact that it expands to `builtin # SYNTAX(…)` should be considered an implementation detail and thus these macros should be considered opaque.
I've applied `#[diagnostic::opaque]` (rust-lang/rust#158608) to all of these macros which successfully suppresses diagnostic notes of the form `` this error originates in the macro `SYNTAX` (…) ``. Well, it doesn't actually omit the expansion from the macro backtrace when `-Zmacro-backtrace` is passed which was surprising but seems intentional looking at the linked PR. Still, this is better than nothing.
r? @mejrs

Read the original on github.com ↗