diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-08-05 08:53:21 +0200 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-08-05 08:53:21 +0200 |
commit | 295b343aecf330e830d79f06e0efc511e7d76da1 (patch) | |
tree | 85057ef1fe401adcd0d958ddf6ff966f25d8fef0 /Mutable references are safe because they prevent aliasing.md | |
parent | f43372529e655f3b039946c969e4465193eb2042 (diff) |
vault backup: 2025-08-05 08:53:21
Diffstat (limited to 'Mutable references are safe because they prevent aliasing.md')
-rw-r--r-- | Mutable references are safe because they prevent aliasing.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Mutable references are safe because they prevent aliasing.md b/Mutable references are safe because they prevent aliasing.md new file mode 100644 index 0000000..bb837f7 --- /dev/null +++ b/Mutable references are safe because they prevent aliasing.md @@ -0,0 +1,7 @@ +[[Pointer safety principle]] +[[Aliasing is accessing the same data through different variables]] +[[Downgrading a mutable reference]] + +--- + +A reference that is mutable is created with `&mut` . They are safe because all permissions are dropped from the borrowed place so it can not be read while the reference exists. It is therefore not an alias.
\ No newline at end of file |