rust/tests
Alejandra González e429bdebbd
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
2025-04-01 18:05:23 +00:00
..
test_utils
ui Fix the primary span of redundant_pub_crate when flagging nameless items 2025-04-01 18:20:41 +02:00
ui-cargo Merge commit '9f9a822509' into clippy-subtree-update 2025-02-28 23:27:09 +01:00
ui-internal Make annotations mandatory for internal ui tests 2025-03-12 11:32:40 +01:00
ui-toml manually fulfill lint expectations for all unsafe blocks with metavars 2025-03-29 17:55:30 +01:00
workspace_test Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
check-fmt.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
clippy.toml Fix situations identified by collapsible_if new hits 2025-03-25 19:50:24 +01:00
compile-test.rs Suggest ./x test src/tools/clippy --bless when in rust-lang/rust (#14507) 2025-03-31 17:30:19 +00:00
config-metadata.rs Merge commit 'a109190d70' into clippy-subtree-update 2024-10-18 13:44:06 +02:00
dogfood.rs Merge commit '7901289135' into clippy-subtree-update 2024-09-24 11:58:04 +02:00
headers.rs
integration.rs Merge commit 'cb806113e0' into clippy-subtree-update 2024-08-08 19:13:50 +02:00
lint_message_convention.rs Update lint_message_convention test to allow clippy "help" message 2025-03-12 11:41:26 +01:00
missing-test-files.rs Merge commit '51d49c1ae2' into clippy-subtree-update 2025-01-28 19:33:54 +01:00
versioncheck.rs Clippy: skip check_host_compiler check in rustc testsuite 2025-02-28 23:27:22 +01:00
workspace.rs