]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #86777 - tmiasko:estimate-terminators, r=estebank
authorbors <bors@rust-lang.org>
Fri, 2 Jul 2021 00:15:58 +0000 (00:15 +0000)
committerbors <bors@rust-lang.org>
Fri, 2 Jul 2021 00:15:58 +0000 (00:15 +0000)
Include terminators in instance size estimate

For example, drop glue generated for struct below, doesn't have any
statements, only terminators. Previously it received an estimate of 0,
the new estimate is 13 (6+5 drop terminators, +1 resume, +1 return).

```rust
struct S {
    a: String,
    b: String,
    c: String,
    d: String,
    e: String,
    f: String,
}
```

Originally reported in https://github.com/rust-lang/rust/issues/69382#issue-569392141


Trivial merge