Borrow::borrow()
causes compile error with NLL, but compiles without NLL
#53151
Labels
A-NLL
Area: Non-lexical lifetimes (NLL)
NLL-complete
Working towards the "valid code works" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
(Feel free to change to the title more appropriate title, I can't explain the problem in single sentence...)
Summary
Happened:
Expected result:
Meta
Code to reproduce
Case 1: in impl
https://play.rust-lang.org/?gist=8a28dd1ee97d6bf3bd7c2e6976a14613&version=nightly&mode=debug&edition=2015
error with NLL:
Case 2: toplevel fn
https://play.rust-lang.org/?gist=f6775d0b5e36911ff5c21603908f2bd2&version=nightly&mode=debug&edition=2015
error with NLL:
The text was updated successfully, but these errors were encountered: