Hacker News new | ask | show | jobs
by imron 1487 days ago
> You cannot use a null pointer in Rust.

Yes you can: https://doc.rust-lang.org/std/ptr/fn.null.html

You just won't use it unless you're doing FFI or similar things.

1 comments

FFI is unsafe, by definition.
You can still use null pointers in safe rust (see the link I posted which is 100% safe rust), you just can’t deference then.
Ok.

I meant "using null pointer" means dereference it. But careless language....