diff options
| author | bors <bors@rust-lang.org> | 2023-03-05 07:56:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-05 07:56:26 +0000 |
| commit | 14c54b637b18f74680d0c0441216714b5e9c150d (patch) | |
| tree | 272d639110ebe58b84c82a8b7be2fa7cd08f88c3 /compiler/rustc_mir_transform/src/coverage/debug.rs | |
| parent | 35636f9459720513ca4ed19373a4a7c9e0ea3c46 (diff) | |
| parent | d1f7fa5b4e0f238f231f968787252f6ad2b1a224 (diff) | |
| download | rust-14c54b637b18f74680d0c0441216714b5e9c150d.tar.gz rust-14c54b637b18f74680d0c0441216714b5e9c150d.zip | |
Auto merge of #107844 - Zeegomo:no-drop-and-rep, r=cjgillot
Desugaring of drop and replace at MIR build This commit desugars the drop and replace deriving from an assignment at MIR build, avoiding the construction of the `DropAndReplace` terminator (which will be removed in a following PR). In order to retain the same error messages for replaces a new `DesugaringKind::Replace` variant is introduced. The changes in the borrowck are also useful for future work in moving drop elaboration before borrowck, as no `DropAndReplace` would be present there anymore. Notes on test diffs: * `tests/ui/borrowck/issue-58776-borrowck-scans-children`: the assignment deriving from the desugaring kills the borrow. * `tests/ui/async-await/async-fn-size-uninit-locals.rs`, `tests/mir-opt/issue_41110.test.ElaborateDrops.after.mir`, `tests/mir-opt/issue_41888.main.ElaborateDrops.after.mir`: drop elaboration generates (or reads from) a useless drop flag due to an issue with the dataflow analysis. Will be fixed independently by https://github.com/rust-lang/rust/pull/106430. See https://github.com/rust-lang/rust/pull/104488 for more context
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions
