about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-08-10 15:08:53 +0200
committerGitHub <noreply@github.com>2023-08-10 15:08:53 +0200
commit710b989b32b6cd140770298c2af5c533bbffb240 (patch)
tree015ae4b52ce6dbae6180dae666317a85f1887001 /compiler/rustc_codegen_llvm/src/builder.rs
parent5b558639f6fe70c25018546ea85ba929b44afc20 (diff)
parent75d5f107ddbac9e0872f1551e70dfbf5d441f3e0 (diff)
downloadrust-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