]> git.lizzy.rs Git - rust.git/commit
An attempt to fix NLL migration mode so that reports region errors when necessary.
authorFelix S. Klock II <pnkfelix@pnkfx.org>
Fri, 3 Aug 2018 22:12:02 +0000 (00:12 +0200)
committerFelix S. Klock II <pnkfelix@pnkfx.org>
Fri, 3 Aug 2018 22:12:15 +0000 (00:12 +0200)
commitabd81c9ff55aa50ee2a98d1f8a2b470acb81d4e6
treec8050eefa99f03785aa7f59dccc2bbf45deb768f
parent88e0ff14a81a2122222e32cf7c285f585c516cfd
An attempt to fix NLL migration mode so that reports region errors when necessary.

Namely, the code here was trying to be clever, and say "lets not
report diagnostics when we 'know' NLL will report an error about them
in the future."

The problem is that in migration mode, when no error was reported here,
the NLL error that we "knew" was coming was downgraded to a warning (!).

This fixes that by only doing the "clever" skipping of region error reporting
when we are not in migration mode.

Rather than make a separate test for issue 53026, I just took the test
that uncovered this in a first place, and extended it (via our
revisions system) to explicitly show all three modes in action:
ACT-borrowck, NLL, and NLL migration mode.

(Tto be honest I hope not to have to add such revisions to many tests.
Instead I hope to adopt some sort of new `compare-mode` for either
borrowck=migrate or for the 2018 edition as a whole.)
src/librustc/infer/error_reporting/mod.rs
src/test/ui/borrowck/issue-45983.ast.stderr [new file with mode: 0644]
src/test/ui/borrowck/issue-45983.migrate.stderr [new file with mode: 0644]
src/test/ui/borrowck/issue-45983.nll.stderr
src/test/ui/borrowck/issue-45983.rs
src/test/ui/borrowck/issue-45983.stderr [deleted file]