diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-08-10 15:08:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-10 15:08:53 +0200 |
| commit | 710b989b32b6cd140770298c2af5c533bbffb240 (patch) | |
| tree | 015ae4b52ce6dbae6180dae666317a85f1887001 /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | 5b558639f6fe70c25018546ea85ba929b44afc20 (diff) | |
| parent | 75d5f107ddbac9e0872f1551e70dfbf5d441f3e0 (diff) | |
| download | rust-710b989b32b6cd140770298c2af5c533bbffb240.tar.gz rust-710b989b32b6cd140770298c2af5c533bbffb240.zip | |
Rollup merge of #114678 - MortenLohne:bugfix/hir-has-side-effects, r=compiler-errors
`Expr::can_have_side_effects()` is incorrect for struct/enum/array/tuple literals It would return 'false' unless *all* sub-expressions had side effects. This would easily allow side effects to slip through, and also wrongly label empty literals as having side effects. Add some tests for the last point The function is only used for simple lints and error messages, so not a serious bug.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions
