News for hackers. Stuff that matters.
Re:2 years of fiddling with Rust – critical thoughts by boundchecked on Monday November 07, 2022 @02:25AM (#33502328)
If you count optimizing your ill-formed function into an inlined panic [1] as "bug eliminated at compile-time", then it may be true!

https://godbolt.org/z/M7Gr3TazE

Re:2 years of fiddling with Rust – critical thoughts by gdprrrr on Wednesday November 09, 2022 @03:27PM (#33537362)
While it would obviously be nice to error at compile time, the docs of the slice type clearly say the code mudt panic in this case. Depending on the context, [T; 3] may be better