#Borrowchk confusion

2 messages · Page 1 of 1 (latest)

placid tendon
#

Hello!

I am having trouble understanding this situation.

Does anyone think that this code shouldn't be rejected by borrowchk? If no, is it a bug or a limitation of the current system?

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=9e87cfb03eede4126781b0fcc0ec7c79

Why does this code compile?

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=96b899795b2740e7237268463eeed6c3

primal field
#

Yes, this is a limitation of the current borrow checker