about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/alloc_example.rs
diff options
context:
space:
mode:
authorAlejandra González <blyxyas@gmail.com>2025-05-19 11:41:40 +0000
committerGitHub <noreply@github.com>2025-05-19 11:41:40 +0000
commitdf33aaf540b24e00b6ad34b11d84c58317660ced (patch)
treea680d3768d5c48f65018652e1cf36ffaa19ab552 /compiler/rustc_codegen_gcc/example/alloc_example.rs
parentd44e35d5952427b37b5a2562bc1514ade943f03d (diff)
parent6fb7d53962623013ce9b4bae7318905a0e4e76ae (diff)
downloadrust-df33aaf540b24e00b6ad34b11d84c58317660ced.tar.gz
rust-df33aaf540b24e00b6ad34b11d84c58317660ced.zip
Check if dropping an expression may have indirect side-effects (#14594)
It is not enough to check if an expression type implements `Drop` to
determine whether it can have a significant side-effect.

Also, add tests for unchecked cases which were explicitly handled in the
code, such as checking for side effect in a `struct`'s fields, or in its
base expression.

Fix rust-lang/rust-clippy#14592

changelog: [`no_effect_underscore_binding`]: do not propose to remove
the assignment of an object if dropping it might indirectly have a
visible side effect
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/alloc_example.rs')
0 files changed, 0 insertions, 0 deletions