This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 4f252f1
authored
Rollup merge of rust-lang#91404 - nnethercote:fix-bad-NodeId-limit-checking, r=dtolnay
Fix bad `NodeId` limit checking.
`Resolver::next_node_id` converts a `u32` to a `usize` (which is
possibly bigger), does a checked add, and then converts the result back
to a `u32`. The `usize` conversion completely subverts the checked add!
This commit removes the conversion to/from `usize`.1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1430 | 1430 | | |
1431 | 1431 | | |
1432 | 1432 | | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1439 | 1436 | | |
1440 | 1437 | | |
1441 | 1438 | | |
| |||
0 commit comments