• M
    Use new region infer errors for explaining borrows · 2a3969a3
    Matthew Jasper 提交于
    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.
    2a3969a3
issue-45696-scribble-on-boxed-borrow.nll.stderr 1.7 KB