10 ms·
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/M7Gr
by boundchecked 4y ago
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 https://godbolt.org/z/M7Gr3TazE
- gdprrrr 4y agoWhile 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