What Rust enables you to do is ship software that formerly would have demanded C/C++ (kernels, drivers, embedded software, browsers, games) without having to use C/C++. That's a security win, but not a game changer for secure software development in general, the vast majority of which is done in non-C/C++ languages already.
I really wish "units of measure" types took off in the langdev world. "String" is woefully inadequate to describe the actual type of a string; Imagine a world where string data is of type <string:urlencoded> or <string:xsssanitized>, and display functions would only accept strings of the correct type. I know F# has this, but unfortunately it never caught on elsewhere.
class urlencoded extends String;
class xsssanitized extends String;
then secure functions can be explicit about what type they need. void embedInPage(xssssanitized xssString);(To be clear, your latter point is referring to things like 'dangerouslySetInnerHTML' in react?)
https://reactjs.org/docs/dom-elements.html#dangerouslysetinn...