]> git.lizzy.rs Git - rust.git/commit
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)
commitb1de3519c9f947f5cbc525719b9365f2fd58f7f9
tree5595b703caec066036e060f3863fe682c335c68d
parent90b7bf6e0a7c9ecd32bc7fd96a76e5e800f3e6ea
parentd8bd5336c90764ca90e0e6f0df5bb309167e872c
Rollup merge of #51057 - pnkfelix:issue-51025-make-ui-tests-robust-wrt-nll, r=nikomatsakis

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