From 22675cd8dc75d8b8d4b0f818f5b093efbc364802 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Fri, 8 Aug 2025 22:44:15 +0200 Subject: vault backup: 2025-08-08 22:44:15 --- ... means that multiple variables point to the same heap data.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Aliasing just means that multiple variables point to the same heap data.md (limited to 'Aliasing just means that multiple variables point to the same heap data.md') diff --git a/Aliasing just means that multiple variables point to the same heap data.md b/Aliasing just means that multiple variables point to the same heap data.md new file mode 100644 index 0000000..5049d5a --- /dev/null +++ b/Aliasing just means that multiple variables point to the same heap data.md @@ -0,0 +1,9 @@ +[[Rust]] +[[Ownership]] +[[Dereferencing is to access the data behind a pointer]] +[[Pointer safety principle]] + + +--- + +Mutating an alias from one part of the program can cause unforeseen effects in other parts of the program that reference the same data. Rust prevents this by making sure that mutable references prevent aliasing. \ No newline at end of file -- cgit v1.2.3