]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #46462 - sinkuu:copyprop_reg2, r=arielb1
authorCorey Farwell <coreyf@rwell.org>
Sun, 3 Dec 2017 22:43:48 +0000 (17:43 -0500)
committerGitHub <noreply@github.com>
Sun, 3 Dec 2017 22:43:48 +0000 (17:43 -0500)
Fix CopyPropagation regression (2)

Remaining part of MIR copyprop regression by (I think) #45380, which I missed in #45753.

```rust
fn foo(mut x: i32) -> i32 {
    let y = x;
    x = 123; // `x` is assigned only once in MIR, but cannot be propagated to `y`
    y
}
```

So any assignment to an argument cannot be propagated.


Trivial merge