O'Reilly logo
  • Ivan Zderadicka thinks this is interesting:

Instead, they will return a Ref and a RefMut, respectively. This is to safely wrap the reference inside, so that the lifetimes get correctly calculated by the compiler without requiring references to live for the whole lifetime of the RefCell.

From

Cover of Rust High Performance

Note

Also to implement runtime check on references .