| ▲ | cyberax 4 hours ago | |||||||
To be fair, Vec::set_len bug in Rust was in 2021. And even then it had to be annotated as `unsafe`. It was then deprecated and a linter check was added: https://github.com/rust-lang/rust-clippy/issues/7681 | ||||||||
| ▲ | Dr_Emann 3 hours ago | parent | next [-] | |||||||
To be even fair-er, it wasn't actually memory unsafety, it was "just" unsoundness, there was a type, that IF you gave it an io reader implementation that was weird, that implementation could see uninit data, or expose uninit data elsewhere, but the only readers actually used were well behaved readers. | ||||||||
| ▲ | orlp an hour ago | parent | prev [-] | |||||||
Vec::set_len is by no means deprecated. The lint you linked only covers a very specific unsound pattern using set_len. | ||||||||
| ||||||||