Fixing Ownership Errors

202307251500
Status: #idea
Tags: Rust

Fixing Ownership Errors

Info

Rust will always reject an unsafe program, but sometimes Rust will reject a safe program

Fixing Unsafe Programs

Returning a reference to the stack

Not enough permissions

Aliasing & Mutating a Data Structure

Copying vs. Moving out of a Collection

Fixing Safe Programs

Rust may also reject safe programs

Mutating Different Tuple Fields

### Mutating Different Array Elements

References

  1. https://rust-book.cs.brown.edu/ch04-03-fixing-ownership-errors.html