about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/structured_errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-28 19:44:14 +0000
committerbors <bors@rust-lang.org>2023-09-28 19:44:14 +0000
commit1393ef1fa0a213bf570075f250364a528965ed68 (patch)
tree0e73a8084a892c795822cf9fda80321139195718 /compiler/rustc_hir_analysis/src/structured_errors.rs
parent42faef503f3e765120ca0ef06991337668eafc32 (diff)
parent1b2c1a85833ce2eb692054e0bbfe18c8911df216 (diff)
downloadrust-1393ef1fa0a213bf570075f250364a528965ed68.tar.gz
rust-1393ef1fa0a213bf570075f250364a528965ed68.zip
Auto merge of #116199 - Urgau:simplify-invalid_ref_casting, r=cjgillot
Simplify some of the logic in the `invalid_reference_casting` lint

This PR simplifies 2 areas of the logic for the `invalid_reference_casting` lint:
 - The init detection: we now use the newly added `expr_or_init` function instead of a manual detection
 - The ref-to-mut-ptr casting detection logic: I simplified this logic by caring less hardly about the order of the casting operations

Those two simplifications permits us to detect more cases, as can be seen in the test output changes.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors.rs')
0 files changed, 0 insertions, 0 deletions