diff options
| author | Alejandra González <blyxyas@gmail.com> | 2025-05-19 11:41:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-19 11:41:40 +0000 |
| commit | df33aaf540b24e00b6ad34b11d84c58317660ced (patch) | |
| tree | a680d3768d5c48f65018652e1cf36ffaa19ab552 /compiler/rustc_codegen_gcc/example/alloc_example.rs | |
| parent | d44e35d5952427b37b5a2562bc1514ade943f03d (diff) | |
| parent | 6fb7d53962623013ce9b4bae7318905a0e4e76ae (diff) | |
| download | rust-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
