Commit Graph

4 Commits

Author SHA1 Message Date
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
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
Matthew Jasper
bc4f9b848d Clearer later use messages for calls
Give a special message when the later use is from a call. Use the span
of the callee instead of the whole expression. For conflicting borrow
messages say that the later use is of the first borrow.
2018-10-03 20:32:38 +01:00
Felix S. Klock II
6bde4298d8 Minimized (and then greatly expanded) test of failure cases from rust-lang/rust#52934. 2018-09-04 16:22:22 +02:00