Here's all the ways pitest will mutate your code to verify tests:
miniblog.
Related Posts
You can go so far with simple data in Rust that it's kinda surprising when you start learning about interior mutability: https://doc.rust-lang.org/std/cell/index.html
If you give a function a value of &T, they can actually mutate any cells within it. It's not sufficient to look for &mut T usages.
Emacs trivia: the list of buffers used to be exposed to elisp as buffer-alist. It's now C-only because it's a footgun if you mutate it.