7 ms·
That Niko's text-arrow lifetime annotations are so helpful here suggests a rust IDE could offer similar highlighting or annotations to explain borrow checker er
by megrimlock 10y ago
That Niko's text-arrow lifetime annotations are so helpful here suggests a rust IDE could offer similar highlighting or annotations to explain borrow checker errors.
One of the ergonomic hurdles to rust adoption by experienced C++ users is that the language looks similar enough that such people may think they fully understand the semantics even before they've fully internalized all the details. It's a tricky zone when something feels familiar enough that you don't realize the remaining mistakes in your conceptualization.
- Manishearth 10y agoThe borrow checker already outputs these arrows. This output is improving, too https://github.com/rust-lang/rust/pull/32756 https://github.com/rust-lang/rust/pull/32756 -- feedback appreciated!
- kibwen 10y agoAt this very moment there is a PR from Niko that is about to land that will overhaul borrow checker error message reporting (and error formatting in general): https://github.com/rust-lang/rust/pull/32756 https://github.com/rust-lang/rust/pull/32756 .