Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
boundchecked
· 4y ago · 0 comments
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
Comments
[–]
gdprrrr
4y ago
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