2 ms·
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
by gpm 7y 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&edition=2018&gist=9371c0ba9116c6d1fc33f90e2ba56a79 https://play.rust-lang.org/?version=stable&mode=release&edit...