On Borrow Checking
Paul Backus
snarwin at gmail.com
Sun May 4 11:02:27 UTC 2025
On Saturday, 3 May 2025 at 19:22:20 UTC, Walter Bright wrote:
> In Rust you can use "unsafe" to avoid the borrow checker.
Also, this is not true, which you would know if you had read
literally anything about unsafe Rust:
> You can take five actions in unsafe Rust that you can’t in safe
> Rust, which we call unsafe superpowers. Those superpowers
> include the ability to:
>
> * Dereference a raw pointer
> * Call an unsafe function or method
> * Access or modify a mutable static variable
> * Implement an unsafe trait
> * Access fields of a union
>
> It’s important to understand that unsafe doesn’t turn off the
> borrow checker or disable any other of Rust’s safety checks
Source: https://doc.rust-lang.org/book/ch20-01-unsafe-rust.html
This page is the first result on Google for "unsafe rust". The
fact that you got this wrong shows very clearly that you have not
done your homework on this topic.
More information about the Digitalmars-d
mailing list