Replace C types with Rust types in std, closes #7313