News for hackers. Stuff that matters.
Re:The borrowchecker is what I like the least about Rust by estebank on Saturday July 19, 2025 @07:14PM (#44620362)
Making partial borrows to be expressable in method definitions would allow the design pattern to be expressed without breaking the current lifetime evaluation boundary.

Allowing the borrow checker to peek inside of the body of local methods for the purposes of identifying partial borrows would fundamentally break the locality of the borrow checker, but I think that as long as that analysis is only extended to methods on the local trait impl, it could be done without too much fanfare. These two things would be relaxations of the borrow checker rules, making it smarter, if you will.

There are no comments on this comment yet.