rust-clippy/tests
bors 37f98fffe7 Auto merge of #13220 - y21:issue13219, r=dswij
[`macro_metavars_in_unsafe`]: recognize metavariables in tail expressions

Fixes #13219

`macro_metavars_in_unsafe` keeps track of the current "expansion depth" (incremented/decremented when entering/leaving a macro span) to tell if an expression from the root context is contained within a macro (see the doc comment I added for a hopefully better explanation)

Before this PR, we didn't increment said `expn_depth` for `unsafe` blocks within macros, because we already do that in `visit_stmt` anyway, so it would work fine for statements, but that's not enough for tail expressions of an unsafe block.

So we now also increment it for macro unsafe blocks.
Also updated the comment for `expn_depth` while I'm at it because "This is not necessary for correctness" isn't correct now that I think about it

------

changelog: none
2024-08-10 12:43:43 +00:00
..
test_utils
ui Auto merge of #13211 - rzvxa:respect_allow_inconsistent_struct_constructor_on_adt, r=Alexendoo 2024-08-09 12:23:53 +00:00
ui-cargo Merge commit '68a799aea9b65e2444fbecfe32217ce7d5a3604f' into clippy-subtree-update 2024-06-27 18:56:04 +02:00
ui-internal Store deprecated lints as an array of tuples. 2024-08-05 09:15:55 -04:00
ui-toml Auto merge of #13220 - y21:issue13219, r=dswij 2024-08-10 12:43:43 +00:00
workspace_test Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
check-fmt.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
clippy.toml
compile-test.rs Merge remote-tracking branch 'upstream/master' into rustup 2024-08-08 18:54:43 +02:00
dogfood.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
headers.rs Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyup 2023-12-16 14:12:50 +01:00
integration.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
lint_message_convention.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
missing-test-files.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
versioncheck.rs Use -D warnings instead of deny-warnings feature. 2024-08-06 10:46:39 -04:00
workspace.rs Stabilize LazyCell and LazyLock (lazy_cell) 2024-02-20 20:55:13 -07:00