2 ms·
There could, and these kind of bugs have happened a few times already, but fortunately they are few and far between, and as the sibling comment mentioned there'
by littlestymaar 5y ago
There could, and these kind of bugs have happened a few times already, but fortunately they are few and far between, and as the sibling comment mentioned there's some work in progress to formal prove the std lib, and because the std lib is much smaller than the amount of code that uses the stdlib, it's much less work to formally verify the stdlib than it would be to verify for instance all C++ programms using the C++ stdlib.
[1]: the most famous bug in the standard library exposing an unsound construction is the “leakpocalypse”: https://github.com/rust-lang/rust/issues/24292 https://github.com/rust-lang/rust/issues/24292