diff options
| author | Timo <30553356+y21@users.noreply.github.com> | 2025-01-22 15:38:43 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-22 15:38:43 +0000 |
| commit | c024c1327bfd0540a0c85e62df1f1527f05fe03f (patch) | |
| tree | b3280fabc35fbc56e55385346efdbc328ce93392 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 67e6bf33fee137e8419863342bac0eecaae0f221 (diff) | |
| parent | 9dca770aec2ef3cec721e5e9852d8a2c646695f0 (diff) | |
| download | rust-c024c1327bfd0540a0c85e62df1f1527f05fe03f.tar.gz rust-c024c1327bfd0540a0c85e62df1f1527f05fe03f.zip | |
`unnecessary_semicolon`: do not lint if it may cause borrow errors (#14049)
Before edition 2024, some temporaries used in scrutinees of a `match` used as the last expression of a block may outlive some referenced local variables. Prevent those cases from happening by checking that alive temporaries with significant drop do have a static lifetime. The check is performed only for edition 2021 and earlier, and for the last statement if it would become the last expression of the block. changelog: [`unnecessary_semicolon`]: prevent borrow errors in editions lower than 2024 r? @y21
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
