Commit 4de5d24
committed
Document panicking cases for integer division
The panic on division by zero is expected, but the panic on overflow
is somewhat surprising (since most arithmetic operations panic on
overflow only when `debug_assertions` is enabled). As a result, it's
helpful to document this behavior.1 parent f689edf commit 4de5d24
1 file changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
| |||
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
471 | | - | |
| 475 | + | |
472 | 476 | | |
473 | 477 | | |
474 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
475 | 482 | | |
476 | 483 | | |
477 | 484 | | |
| |||
0 commit comments