4 ms·
What you describe about 'const' is just about const correctness. That's important but different than aliasing. For example consider Slice::swap [1]. This does
by millstone 6y ago
What you describe about 'const' is just about const correctness. That's important but different than aliasing.
For example consider Slice::swap [1]. This does consider the possibility that the pointers alias, and correctly, because they might point at the same object.
https://doc.rust-lang.org/src/core/slice/mod.rs.html#541-553 https://doc.rust-lang.org/src/core/slice/mod.rs.html#541-553
- aliceryhl 6y agoThanks for posting that link. I found the following issue because of it: https://github.com/rust-lang/rust/issues/80682 https://github.com/rust-lang/rust/issues/80682