@sfackler --- actually, if I remove Rc this seems to fix the issue with allowing two mut references --- at least I can't get rustc to allow two concurrent mutable references.
I can have an immutable and a mutable at the same time, though.
let mut f = Cache::new();
let mut g = f.0.borrow_mut();
println!("f0={}", f[1]); // no complaint even though we have a borrow_mut
g.0[1] = 1;
f[1] = 1; // rustc error b/c already did a borrow_mut()
The wording around UnsafeCell is confusing. I can't tell if this violation (immutable + mutable) at the same time is blessed or not. E.g.,