about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorAlejandra González <blyxyas@gmail.com>2025-04-01 18:05:23 +0000
committerGitHub <noreply@github.com>2025-04-01 18:05:23 +0000
commite429bdebbdbfaad7b86caa0fa394e12e2dea22f5 (patch)
treecfffaa6c6d4cb6ca0ff84e8a98980326d78ab07d /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent46878e320a5c602c0600e0af25de5b32eb35517b (diff)
parentffaecd008d8c2361d1043a20e06c7090f64193c3 (diff)
downloadrust-e429bdebbdbfaad7b86caa0fa394e12e2dea22f5.tar.gz
rust-e429bdebbdbfaad7b86caa0fa394e12e2dea22f5.zip
Manually fulfill lint expectations for all unsafe blocks with metavars (#14501)
Fixes #14488

Context: the `macro_metavars_in_unsafe` lint looks for unsafe blocks
with a macro span that then contain expressions with a root context span
(which means that it is a macro with an unsafe block expanding a
metavariable inside). In order to avoid emitting a warning for every
single macro invocation, it will deduplicate the unsafe blocks by the
span in the macro.

This leads to the linked issue where because of the deduplicating and
removing unsafe blocks that all belong to the same unsafe block in the
macro, only one of the unsafe blocks will actually have its lint
expectation fulfilled. This PR fixes that by manually fulfilling all of
the unsafe blocks from all expansions before deduplicating them.

changelog: [`macro_metavars_in_unsafe`]: fix unfulfilled `#[expect]` if
macro is invoked multiple times
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions