Stream: t-compiler/wg-nll

Topic: pr-52809-and-52793


davidtwco (Aug 01 2018 at 15:00, on Zulip):

Just an FYI @pnkfelix in case you've not noticed, I updated/responded to feedback on #52809 and #52793.

pnkfelix (Aug 01 2018 at 15:00, on Zulip):

ah thanks for the ping

davidtwco (Aug 01 2018 at 15:06, on Zulip):

Ah, I had no idea about #[rustc_error] - I'll need to remember that in future.

pnkfelix (Aug 01 2018 at 15:13, on Zulip):

that's good, because i just added a note asking you to use it on #52793. :)

pnkfelix (Aug 01 2018 at 15:14, on Zulip):

(you shouldn't need to add an explicit use of NLL to the test, since compare-mode=nll will take care of that.)

pnkfelix (Aug 01 2018 at 15:15, on Zulip):

An alternative approach would be to use the revisions: system to encode all the various variants that one might want to test (AST-borrowck, NLL, 2008 edition migration mode, ...). But that is more effort than is probably warranted in this case.

davidtwco (Aug 01 2018 at 15:16, on Zulip):

I wasn't sure if revisions was supported in ui tests.

pnkfelix (Aug 01 2018 at 15:16, on Zulip):

yeah they are

pnkfelix (Aug 01 2018 at 15:17, on Zulip):

The interaction with compare-mode=nll can sometimes be tricky

pnkfelix (Aug 01 2018 at 15:17, on Zulip):

but it basically ends up being something where you can have R*2 stderr files, where R is the number of revisions

pnkfelix (Aug 01 2018 at 15:18, on Zulip):

file.rev1.err, file.rev2.err, ..., file.revN.err, file.rev1.nll.err, file.rev2.nll.err, ..., file.revN.nll.err

pnkfelix (Aug 01 2018 at 15:18, on Zulip):

but we don't encounter that often

davidtwco (Aug 01 2018 at 15:18, on Zulip):

Fair enough.

pnkfelix (Aug 01 2018 at 15:18, on Zulip):

and I actually added a way to opt out of compare-mode

pnkfelix (Aug 01 2018 at 15:18, on Zulip):

in order to sidestep a nasty case where the revisions I wanted to encode were meant to inject their own -Z borrowck flag usage

pnkfelix (Aug 01 2018 at 15:19, on Zulip):

You can see it in this test case here: https://github.com/pnkfelix/rust/blob/9f05f29e564c03a432df78f7c4b6421e4fb1a338/src/test/ui/borrowck/borrowck-migrate-to-nll.rs#L22

pnkfelix (Aug 01 2018 at 15:20, on Zulip):

anyway, you really dont have to use revisions in this case. Its simpler and just as effective to let compare-mode=nll do the work.

davidtwco (Aug 01 2018 at 15:22, on Zulip):

@pnkfelix test should be updated now.

pnkfelix (Aug 01 2018 at 15:23, on Zulip):

oh great that was a lot quicker than I expected

davidtwco (Aug 01 2018 at 15:30, on Zulip):

@pnkfelix added the comment.

pnkfelix (Aug 01 2018 at 15:31, on Zulip):

sweet thanks!

davidtwco (Aug 01 2018 at 15:31, on Zulip):

There may be an extra "output" word in there, but it might just still make sense.

Last update: Nov 21 2019 at 13:05UTC