Consider confirming that the `TypeId`s used in a crate are unique
Nobody has claimed this yet.
- Dominant language
- Markdown
- Stars
- 6.6k
- Forks
- 1.7k
- Avg merge
- 16h 14m
- Merged PRs (30d)
- 1
Description
Issue by huonw
Thursday Sep 11, 2014 at 22:03 GMT
For earlier discussion, see https://github.com/rust-lang/rust/issues/17179
This issue was labelled with: A-an-interesting-project in the Rust repository
If two TypeIds of different types collide, we can get unsoundness, since Any relies on TypeId being unique for safe downcasts. We could have the compiler double check that any TypeIds it computes haven't occured before from another type.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the earlier discussion in Rust issue #17179 and the issue's explanation of TypeId and Any. Determine the compiler scope for checking TypeId uniqueness and define how completion would demonstrate that distinct types cannot produce colliding TypeIds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100