kobebrookskC3
Joined 5 years ago
Joined 5 years ago
no, it is dereferencing, not constructing, an invalid pointer, that is UB. there is even a safe function provided to construct an invalid but non-null pointer: `https://doc.rust-lang.org/stable/std/ptr/fn.dangling.html`
"simply" and "formal verification" are usually oxymorons, never mind "automatically"
> It would be perfectly possible to design a variant of Rust that gets you to 80-90% of Rust's usability, with the same safety, without macros.
i then present an api that i think relies on macros to expose a safe api
> Of course macros are good for encapsulation and abstraction, but that's a different subject.
no it's not. exposing safe abstractions is pretty much rust's raison d'être
fn pin(x: T) -> Pin<&mut T> { ... }
would move the valuein ancient times, you could banish people from the village
even if you know what the data sheet says, it's easier said than done, especially when the tool gives you basically no help. you are just praying people will magically just git gud.