It's supposed to be a task for static analysis done by a separate compiler-like tool
FPC has already wpo and that could be extended. (too few people actually use wpo)
Some of distinctive features of Rust: immutable by default and there's no null. Maybe contentious for some.
The original set of pascal instructions has no nil as well. If freepascal could add a mode to forbid pointer manipulations - not just {$pointermath off} but also @ and addr and the likes - it is also immutable by proxy.