]> git.lizzy.rs Git - rust.git/commit
Auto merge of #53327 - wesleywiser:wip_optimize_nll, r=nikomatsakis
authorbors <bors@rust-lang.org>
Fri, 7 Sep 2018 17:56:23 +0000 (17:56 +0000)
committerbors <bors@rust-lang.org>
Fri, 7 Sep 2018 17:56:23 +0000 (17:56 +0000)
commitfc81e36242ddddb7149a0d1ca44ebce7fb9eef8a
treeae68e6f14d8abcbd05accc9a93bb8d9aa04471fa
parent24ef47bccf487a2f80f71f228d71e35f89c5e1d3
parentb1211e870370cac1000a64c48ceb8a2ad6dc1f45
Auto merge of #53327 - wesleywiser:wip_optimize_nll, r=nikomatsakis

[nll] teach SCC about `'static`

r? @nikomatsakis

I think this is right? I am seeing better performance on the `html5ever` benchmark but I'd like a perf run to quantify the exact speedup. There's a few ui tests failing due to changes in the error messages. The main issue seems to be that returns aren't being detected correctly?

`mir_check_cast_unsize.rs` before:

```
error: unsatisfied lifetime constraints
  --> mir_check_cast_unsize.rs:17:46
   |
17 |   fn bar<'a>(x: &'a u32) -> &'static dyn Debug {
   |  ________--____________________________________^
   | |        |
   | |        lifetime `'a` defined here
18 | |     //~^ ERROR unsatisfied lifetime constraints
19 | |     x
20 | |     //~^ WARNING not reporting region error due to nll
21 | | }
   | |_^ return requires that `'a` must outlive `'static`
```

`mir_check_cast_unsize.rs` after:

```
error: unsatisfied lifetime constraints
  --> mir_check_cast_unsize.rs:19:5
   |
17 | fn bar<'a>(x: &'a u32) -> &'static dyn Debug {
   |        -- lifetime `'a` defined here
18 |     //~^ ERROR unsatisfied lifetime constraints
19 |     x
   |     ^ cast requires that `'a` must outlive `'static`
```