File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -200,8 +200,7 @@ extern "rust-intrinsic" {
200
200
/// Gets an identifier which is globally unique to the specified type. This
201
201
/// function will return the same value for a type regardless of whichever
202
202
/// crate it is invoked in.
203
- pub fn type_id < T : ' static > ( ) -> TypeId ;
204
-
203
+ pub fn type_id < T : ?Sized + ' static > ( ) -> TypeId ;
205
204
206
205
/// Create a value initialized to zero.
207
206
///
@@ -552,8 +551,9 @@ pub struct TypeId {
552
551
553
552
impl TypeId {
554
553
/// Returns the `TypeId` of the type this generic function has been instantiated with
555
- pub fn of < T : ' static > ( ) -> TypeId {
554
+ pub fn of < T : ? Sized + ' static > ( ) -> TypeId {
556
555
unsafe { type_id :: < T > ( ) }
557
556
}
557
+
558
558
pub fn hash ( & self ) -> u64 { self . t }
559
559
}
You can’t perform that action at this time.
0 commit comments