Commit Graph

5 Commits

Author SHA1 Message Date
Matthew Jasper
2a3969a3f7 Use new region infer errors for explaining borrows
This gives at least some explanation for why a borrow is expected to
last for a certain free region. Also:

* Reports E0373: "closure may outlive the current function" with NLL.
* Special cases the case of returning a reference to (or value
  referencing) a local variable or temporary (E0515).
* Special case assigning a reference to a local variable in a closure
  to a captured variable.
2018-10-21 12:35:00 +01:00
David Wood
539404b77d
Update output for borrowck=migrate compare mode.
This commit updates the test output for the updated NLL compare mode
that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The
previous commit changes `compiletest` and this commit only updates
`.nll.stderr` files.
2018-10-17 00:57:32 +02:00
Mikhail Modin
2af199d58e Update E0714 to E0716 in tests output 2018-09-25 16:24:20 +01:00
Mikhail Modin
5fc0b743d7 add "temporary value dropped while borrowed" error
Issue #54131
2018-09-25 15:23:56 +01:00
David Wood
3fc7ab2373
Merged migrated compile-fail tests and ui tests. Fixes #46841. 2018-08-14 11:12:09 +02:00