you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 2 months ago

these rules are affected by whether you can or can't edit the referenced data

Yes, but not quite. They are affected by whether something else is allowed to look at the referenced data at that time. You can mutate data behind a shared reference with interior mutability: https://doc.rust-lang.org/reference/interior-mutability.html

  • source
  • parent