diff options
| author | Nathan Vegdahl <cessen@cessen.com> | 2025-01-29 17:22:13 +0100 |
|---|---|---|
| committer | Nathan Vegdahl <cessen@cessen.com> | 2025-01-29 17:22:13 +0100 |
| commit | 0cf275b9fe9d610678ded0bfcad262b8552a1b51 (patch) | |
| tree | ccd290497cce8fa4cc13f0d2bfc7ddf3281bf0d8 /tests/rustdoc-ui/coverage/enum-tuple.rs | |
| parent | 2386e95072a8468df8e35c68c2c3b4b3ac8f1d9f (diff) | |
| download | rust-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
