about summary refs log tree commit diff
path: root/tests/ui/patchable-function-entry/patchable-function-entry-flags.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-03 21:43:01 +0000
committerbors <bors@rust-lang.org>2024-01-03 21:43:01 +0000
commitebf5c1a928eb47bad735db563d21be0e5e206521 (patch)
tree5df82aa4aa9999824c98ded5a8b0b52ebd0ee8f4 /tests/ui/patchable-function-entry/patchable-function-entry-flags.rs
parent17dcd0d2e4953fb00277c45c9b193a36394b1bea (diff)
parent6c28f0765ea6e7c819292e1ed800895aac9f00ae (diff)
downloadrust-ebf5c1a928eb47bad735db563d21be0e5e206521.tar.gz
rust-ebf5c1a928eb47bad735db563d21be0e5e206521.zip
Auto merge of #12031 - y21:eager_transmute_more_binops, r=llogiq
Lint nested binary operations and handle field projections in `eager_transmute`

This PR makes the lint a bit stronger. Previously it would only lint `(x < 4).then_some(transmute(x))` (that is, a single binary op in the condition). With this change, it understands:
- multiple, nested binary ops: `(x < 4 && x > 1).then_some(...)`
- local references with projections: `(x.field < 4 && x.field > 1).then_some(transmute(x.field))`

changelog: [`eager_transmute`]: lint nested binary operations and look through field/array accesses

r? llogiq (since you reviewed my initial PR #11981, I figured you have the most context here, sorry if you are too busy with other PRs, feel free to reassign to someone else then)
Diffstat (limited to 'tests/ui/patchable-function-entry/patchable-function-entry-flags.rs')
0 files changed, 0 insertions, 0 deletions