]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #51057 - pnkfelix:issue-51025-make-ui-tests-robust-wrt-nll, r=nikomat...
authorMark Simulacrum <mark.simulacrum@gmail.com>
Sat, 26 May 2018 17:22:54 +0000 (11:22 -0600)
committerGitHub <noreply@github.com>
Sat, 26 May 2018 17:22:54 +0000 (11:22 -0600)
make ui tests robust with respect to NLL

This PR revises the `ui` tests that I could quickly identify that:
 1. previously had successful compilations under non-lexical lifetimes (NLL) because they assumed lexical lifetimes, but
 2. such assumption of lexical lifetimes was actually not necessarily part of the spirit of the original issue/bug we want to witness.

In many cases, this is simply a matter of adding a use of a borrow so that it gets extended long enough to observe a conflict.

(In some cases the revision was more subtle, such as adding a destructor, or revising the order of declaration of some variables.)

----

With these test revisions in place, I subsequently updated the expected stderr output under the NLL compiletest mode. So now we should get even more testing of NLL than we were before.

Fix #51025


Trivial merge