Hacker News new | ask | show | jobs
by gpm 2331 days ago
That's actually just a lint that you can turn off with #[allow(const_err)], though obviously you shouldn't turn it off on a real project since it catches stupid mistakes like this.

And yep, the result is a panic, even with debug_assertions off (i.e. you make overflows wrap instead of panic).

https://play.rust-lang.org/?version=stable&mode=release&edit...