]> git.lizzy.rs Git - rust.git/commit
Auto merge of #70447 - ecstatic-morse:storage-live-always, r=tmandry
authorbors <bors@rust-lang.org>
Fri, 10 Apr 2020 06:14:47 +0000 (06:14 +0000)
committerbors <bors@rust-lang.org>
Fri, 10 Apr 2020 06:14:47 +0000 (06:14 +0000)
commit96d77f0e5f103612d62b85938aacfb33f5768433
tree57e0c214f2601c35af8a446badc471b312c07801
parent0c835b0cca83fe21090562603e4bda77c183ace3
parent209087b8fa26f28c847a5a98afa0bc52ed4f769b
Auto merge of #70447 - ecstatic-morse:storage-live-always, r=tmandry

Add utility to find locals that don't use `StorageLive` annotations and use it for `MaybeStorageLive`

Addresses https://github.com/rust-lang/rust/pull/70004#issuecomment-599271717 (cc @RalfJung).

The only dataflow analysis that is incorrect in this case is `MaybeStorageLive`. `transform/generator.rs` implemented custom handling for this class of locals, but other consumers of this analysis (there's one in [clippy](https://github.com/rust-lang/rust-clippy/blob/513b46793e98ce5b412d388a91f6371d6a9b290b/clippy_lints/src/redundant_clone.rs#L402)) would be incorrect.

r? @tmandry