News for hackers. Stuff that matters.
Re:Rust 2024 the Year of Everywhere? by woodruffw on Thursday September 22, 2022 @11:21PM (#32947634)
Unsafe Rust's syntax is a superset of Safe Rust, meaning that there is syntax in Unsafe Rust that will not compile in Safe Rust[1].

[1]: https://doc.rust-lang.org/book/ch19-01-unsafe-rust.html

Re:Rust 2024 the Year of Everywhere? by biorach on Friday September 23, 2022 @06:01AM (#32949899)
It's the same syntax. There are no special operators in unsafe rust. All unsafe code is syntactically valid safe code. The reason it will not compile it because certain operations are not permitted, not because of syntax errors
Re:Rust 2024 the Year of Everywhere? by Ygg2 on Friday September 23, 2022 @09:31AM (#32951705)
That doc needs to be rewritten. By that logic, closure Rust is another subset, and Iterator, so are pub (crate) modifiers, etc.

It just allows access to: raw pointers, unsafe fields and methods, and unsafe traits.