Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider confirming that the TypeIds used in a crate are unique #17179

Closed
huonw opened this issue Sep 11, 2014 · 1 comment
Closed

Consider confirming that the TypeIds used in a crate are unique #17179

huonw opened this issue Sep 11, 2014 · 1 comment

Comments

@huonw
Copy link
Member

huonw commented Sep 11, 2014

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.

@steveklabnik
Copy link
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#664

lnicola pushed a commit to lnicola/rust that referenced this issue May 19, 2024
Fix source_range for INT_NUMBER in completion

fix rust-lang#17179.

Previously r-a use `TextRange::empty(self.position.offset)` as `source_range` for `INT_NUMBER`, so the `text_edit` would always be an insertion, which results in rust-lang#17179.

This PR changed it by using `text_range` of `original_token` (same as `IDENT`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants