]> git.lizzy.rs Git - rust.git/commitdiff
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)
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


Trivial merge