diff options
| author | Ralf Jung <post@ralfj.de> | 2020-06-15 09:57:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-15 09:57:20 +0200 |
| commit | 5c61a8dc34c3e2fc6d7f02cb288c350f0233f944 (patch) | |
| tree | 964b60e75d4aae01cea79fb0ee20b72c93585f8f /src/liballoc/vec.rs | |
| parent | 4fb54ed484e2239a3e9eff3be17df00d2a162be3 (diff) | |
| parent | 2dcf7dbb8635a8fc3e972eac8204a83d616e1f50 (diff) | |
| download | rust-5c61a8dc34c3e2fc6d7f02cb288c350f0233f944.tar.gz rust-5c61a8dc34c3e2fc6d7f02cb288c350f0233f944.zip | |
Rollup merge of #71824 - ecstatic-morse:const-check-post-drop-elab, r=oli-obk
Check for live drops in constants after drop elaboration Resolves #66753. This PR splits the MIR "optimization" pass series in two and introduces a query–`mir_drops_elaborated_and_const_checked`–that holds the result of the `post_borrowck_cleanup` analyses and checks for live drops. This query is invoked in `rustc_interface` for all items requiring const-checking, which means we now do `post_borrowck_cleanup` for items even if they are unused in the crate. As a result, we are now more precise about when drops are live. This is because drop elaboration can e.g. eliminate drops of a local when all its fields are moved from. This does not mean we are doing value-based analysis on move paths, however; Storing a `Some(CustomDropImpl)` into a field of a local will still set the qualifs for that entire local. r? @oli-obk
Diffstat (limited to 'src/liballoc/vec.rs')
0 files changed, 0 insertions, 0 deletions
