diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-06 10:03:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-06 10:03:22 +0200 |
| commit | 71b73e529a4898ae97e8448cad62f9166da968f1 (patch) | |
| tree | 7be163cf8545b3e1e1456e1371a4a8184051493a /compiler/rustc_index/src | |
| parent | febb10d0a2d29278135676783f6a22eb83295981 (diff) | |
| parent | 63cfb3af37d74d312829d4e260e03128eb7e3f27 (diff) | |
| download | rust-71b73e529a4898ae97e8448cad62f9166da968f1.tar.gz rust-71b73e529a4898ae97e8448cad62f9166da968f1.zip | |
Rollup merge of #143416 - joshtriplett:mbe-simplifications, r=nnethercote
mbe: Defer checks for `compile_error!` until reporting an unused macro rule The current MBE parser checks rules at initial parse time to see if their RHS has `compile_error!` in it, and returns a list of rule indexes and LHS spans that don't map to `compile_error!`, for use in unused macro rule checking. Instead, have the unused macro rule reporting ask the macro for the rule to report, and let the macro check at that time. That avoids checking rules unless they're unused. In the process, refactor the data structure used to store macro rules, to group the LHS and RHS (and LHS span) of each rule together, and refactor the unused rule tracking to only track rule indexes. This builds atop a couple of minor MBE refactors. I would suggest reviewing commit-by-commit. The overall result is a further simplification of the macro code.
Diffstat (limited to 'compiler/rustc_index/src')
0 files changed, 0 insertions, 0 deletions
