Skip to content

rustc_expand: improve diagnostics for non-repeatable metavars#154014

Draft
Unique-Usman wants to merge 1 commit intorust-lang:mainfrom
Unique-Usman:ua/decmacrounrepeatable2
Draft

rustc_expand: improve diagnostics for non-repeatable metavars#154014
Unique-Usman wants to merge 1 commit intorust-lang:mainfrom
Unique-Usman:ua/decmacrounrepeatable2

Conversation

@Unique-Usman
Copy link
Contributor

No description provided.

Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
@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. labels Mar 17, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 17, 2026

r? @adwinwhite

rustbot has assigned @adwinwhite.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 15 candidates

@Unique-Usman
Copy link
Contributor Author

r? @estebank

@rustbot rustbot assigned estebank and unassigned adwinwhite Mar 17, 2026
@Unique-Usman Unique-Usman marked this pull request as draft March 17, 2026 21:04
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2026
@rust-log-analyzer
Copy link
Collaborator

The job pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_symbol_mangling v0.0.0 (/checkout/compiler/rustc_symbol_mangling)
error[E0621]: explicit lifetime required in the type of `rules`
   --> compiler/rustc_expand/src/mbe/macro_rules.rs:355:1
    |
355 |   #[instrument(skip(cx, transparency, arg, rules))]
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   |
    |   lifetime `'cx` required
    |   in this attribute macro expansion
    |
   ::: /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-attributes-0.1.30/src/lib.rs:566:1
    |
566 | / pub fn instrument(
567 | |     args: proc_macro::TokenStream,
568 | |     item: proc_macro::TokenStream,
569 | | ) -> proc_macro::TokenStream {
    | |____________________________- in this expansion of `#[instrument]`
    |
help: add explicit lifetime `'cx` to the type of `rules`
    |
364 |     rules: &'cx [MacroRule],
    |             +++

For more information about this error, try `rustc --explain E0621`.
[RUSTC-TIMING] rustc_expand test:false 1.445
error: could not compile `rustc_expand` (lib) due to 1 previous error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants