]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #91404 - nnethercote:fix-bad-NodeId-limit-checking, r=dtolnay
authorMatthias Krüger <matthias.krueger@famsik.de>
Wed, 1 Dec 2021 09:50:23 +0000 (10:50 +0100)
committerGitHub <noreply@github.com>
Wed, 1 Dec 2021 09:50:23 +0000 (10:50 +0100)
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`.


Trivial merge