-
Notifications
You must be signed in to change notification settings - Fork 1.7k
A unique string key for TypeId #694
Copy link
Copy link
Open
Labels
T-compilerRelevant to the compiler team, which will review and decide on the RFC.Relevant to the compiler team, which will review and decide on the RFC.T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the RFC.Relevant to the compiler team, which will review and decide on the RFC.T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Tuesday Jan 13, 2015 at 22:40 GMT
For earlier discussion, see rust-lang/rust#21116
This issue was labelled with: A-libs, A-typesystem in the Rust repository
I want to implement a mapping of
Box<T: 'static>to GType. That dynamic type system requires process-unique type names. So I'd like to have a process-unique key, preferably a string, available fromTypeIdor a similar API.Now, it's likely that
TyDescnames are sufficiently unique, and hash collisions onTypeIdbreak the world as Rust knows it (#17179) so theu64hash value can be used as practically unique, but: 1) uniqueness constraints on any of those are not documented; 2) access toTyDescis unsafe.