Here for some borrow checker like information,
https://devblogs.microsoft.com/cppblog/lifetime-profile-upda...
https://llvm.org/devmtg/2019-04/slides/TechTalk-Horvath-Impl...
https://devblogs.microsoft.com/cppblog/lifetime-profile-upda...
https://llvm.org/devmtg/2019-04/slides/TechTalk-Horvath-Impl...
There might be some set of tools out there that will make C++ as safe as Rust(It seems like some are talking about borrow checkers but finding it near impossible?), but Rust is designed for safety from the ground up.
Plus, even if your linter catches 100% of bugs, your libraries probably won't use those standards, and may be full of bugs.
Not that you'd ever do a JS-level amount of reuse in C, since the lack of standardized package management sometimes makes it not even worth it to use a library, almost like they actively want to discourage reuse.
Rust has a problem with some things being community that should be stdlib, but standard practice in C++ seems to be to reinvent way more wheels than other languages.