about summary refs log tree commit diff
path: root/tests/rustdoc-ui/coverage/enum-tuple.rs
diff options
context:
space:
mode:
authorNathan Vegdahl <cessen@cessen.com>2025-01-29 17:22:13 +0100
committerNathan Vegdahl <cessen@cessen.com>2025-01-29 17:22:13 +0100
commit0cf275b9fe9d610678ded0bfcad262b8552a1b51 (patch)
treeccd290497cce8fa4cc13f0d2bfc7ddf3281bf0d8 /tests/rustdoc-ui/coverage/enum-tuple.rs
parent2386e95072a8468df8e35c68c2c3b4b3ac8f1d9f (diff)
downloadrust-0cf275b9fe9d610678ded0bfcad262b8552a1b51.tar.gz
rust-0cf275b9fe9d610678ded0bfcad262b8552a1b51.zip
Fix #19071: ensure `completion_item_hash` serializes items uniquely
Previously it may have been possible for different completion items to
produce colliding hashes, not because of the hash but because of how
the items were serialized into byte streams for hashing. See #19071
for details.

The chances of that happening were low, if it was actually possible at
all. Nevertheless, this commit ensures that it definitely can't happen.

This commit uses a handful of techniques used to fix this, but they all
boil down to "ensure this could be re-parsed". If it's possible to parse
to recreate the original item, then by construction there is no chance
of two different items getting serialized to identical byte streams.
Diffstat (limited to 'tests/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions