about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-12-15 10:17:32 +0100
committerGitHub <noreply@github.com>2018-12-15 10:17:32 +0100
commit9544c1760c5dbfe50b2f514bae4ef573f8c519cf (patch)
tree9c206592fee8e54234dd735693e2b21bfc73407c /src/test/incremental/thinlto
parent846db94c667e534ec4886842030a8128186a51dd (diff)
parent29e7ca940b781537605147455410914e8167f40f (diff)
downloadrust-9544c1760c5dbfe50b2f514bae4ef573f8c519cf.tar.gz
rust-9544c1760c5dbfe50b2f514bae4ef573f8c519cf.zip
Rollup merge of #56746 - pnkfelix:issue-56537-add-test-of-closure-using-region-from-containing-fn, r=nikomatsakis
Add test of current behavior (infer free region within closure body)

This behavior was previously not encoded in our test suite.

it is pretty important that we test this behavior. In particular, in #56537  I had proposed expanding the lifetime elision rules so that they would apply to some of the cases encoded in this test, which would cause them to start failing to compile successfully (because the lifetime attached to the return type would start being treated as connected to the lifetime on the input parameter to the lambda expression, which is explicitly *not* what the code wants in this particular case).

In other words, I am trying to ensure that anyone who tries such experiments with lifetime elision in the future quickly finds out why we don't support lifetime elision on lambda expressions (at least not in the naive manner described on #56537).
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions