about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-09-16 11:53:12 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2019-09-16 11:53:12 +1000
commit43c0d2ce8eae322e0b1ffe945e356e30c808dbb3 (patch)
tree2137d29d9f4e87b827fd5ea458c47c774b4195e8 /src/test/ui/thinlto
parent04b1111ae8dd97f3cf558654015b8101d270c634 (diff)
downloadrust-43c0d2ce8eae322e0b1ffe945e356e30c808dbb3.tar.gz
rust-43c0d2ce8eae322e0b1ffe945e356e30c808dbb3.zip
Redefine `NodeIndex` as a `newtype_index!`.
This commit removes the custom index implementation of `NodeIndex`,
which probably predates `newtype_index!`.

As well as eliminating code, it improves the debugging experience,
because the custom implementation had the property of being incremented
by 1 (so it could use `NonZeroU32`), which was incredibly confusing if
you didn't expect it.

For some reason, I also had to remove an `unsafe` block marker from
`from_u32_unchecked()` that the compiler said was now unnecessary.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions