]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #98713 - nikomatsakis:issue-98693, r=jackh726
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 10 Jul 2022 22:33:47 +0000 (00:33 +0200)
committerGitHub <noreply@github.com>
Sun, 10 Jul 2022 22:33:47 +0000 (00:33 +0200)
commit2cb7d1c933e0444732b7eee4b3945964e84bbe39
tree3d4311e661b7cf81d518903b40ba274ee1918110
parentc396bb3b8a16b1f2762b7c6078dc3e023f6a2493
parent7fda86249fd37e5ff148427771423bfefc0b1e4a
Rollup merge of #98713 - nikomatsakis:issue-98693, r=jackh726

promote placeholder bounds to 'static obligations

In NLL, when we are promoting a bound out from a closure, if we have a requirement that `T: 'a` where `'a` is in a higher universe, we were previously ignoring that, which is totally wrong. We should be promoting those constraints to `'static`, since universes are not expressible across closure boundaries.

Fixes #98693

~~(Marking as WIP because I'm still running tests, haven't add the new test, etc)~~

r? ``@jackh726``
compiler/rustc_borrowck/src/region_infer/mod.rs