D has transitive inference of purity (either weak or strong) on templated functions. This is useful in, for instance, safe parallelization.
Does Rust have something similar?
Specifically, Rust functions that read/write shared/global variables inside
unsafe blocks cannot be safely parallelized. Is it up to the developer of such functions to not do such mistakes?
As a comparison, in the D case, such functions will be inferred as (memory)
@safe but non-
pure. IMHO, that is a more precise way of categorizing the behaviour of such a function.