about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2025-07-04 01:22:37 -0700
committerJosh Triplett <josh@joshtriplett.org>2025-07-05 16:23:13 -0700
commit63cfb3af37d74d312829d4e260e03128eb7e3f27 (patch)
tree27a7b1f6e95eac594af63fb1bc230fd6008ebd11 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent0d5ab3e46ce3be1e5e3c45ac0ff7d355303c4353 (diff)
downloadrust-63cfb3af37d74d312829d4e260e03128eb7e3f27.tar.gz
rust-63cfb3af37d74d312829d4e260e03128eb7e3f27.zip
mbe: Defer checks for `compile_error!` until reporting an unused macro rule
The 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 ends up being a net simplification, and reduction in code size.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions