What is Allocator::by_ref for?
Rust Internals [Unofficial]
May 25, 2026
Morgane55440:
x.by_ref().other_method().yet_another()is meant to be a nicer way to write(&mut x).other_method().yet_another()(yes the parentheses are necesary)
The documentation should maybe actually say this , because I could not for the life of me figure out what it was doing from the existing documentation, but this makes perfect sense.
Discussion in the ATmosphere