about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-05-30 07:01:29 +0200
committerGitHub <noreply@github.com>2025-05-30 07:01:29 +0200
commit896be667b867fe5a677a6451ba67fb232ee32016 (patch)
treef6c2b98392b8fe585bcb2705e31ddc1078fcdb88 /compiler/rustc_codegen_llvm/src/builder.rs
parent5fc3f26748d0913dfa56b19be3ccef2d7846d2d1 (diff)
parent6eb601036859970c93c30781f6dfd1061a0c6737 (diff)
downloadrust-896be667b867fe5a677a6451ba67fb232ee32016.tar.gz
rust-896be667b867fe5a677a6451ba67fb232ee32016.zip
Rollup merge of #141407 - mu001999-contrib:dead-code/refactor, r=petrochenkov
Refactor the two-phase check for impls and impl items

Refactor the two-phase dead code check to make the logic clearer and simpler:
1. adding assoc fn and impl into `unsolved_items` directly during the initial construction of the worklist
2. converge the logic of checking whether assoc fn and impl are used to `item_should_be_checked`, and the item is considered used only when its corresponding trait and Self adt are used

This PR only refactors as much as possible to avoid affecting the original functions. However, due to the adjustment of the order of checks, the test results are slightly different, but overall, there is no regression problem

Fixes rust-lang/rust#127911
Fixes rust-lang/rust#128839

Extracted from https://github.com/rust-lang/rust/pull/128637.
r? petrochenkov

try-job: dist-aarch64-linux
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
0 files changed, 0 insertions, 0 deletions