Skip to content

Commit 24ccb34

Browse files
committed
Revert "Remove the unneeded Sized bound on TypeId creation"
This reverts commit 2404232. Conflicts: src/libcore/intrinsics.rs
1 parent 56a9e2f commit 24ccb34

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/libcore/intrinsics.rs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@
4242
#![experimental]
4343
#![allow(missing_docs)]
4444

45-
#[cfg(not(stage0))]
46-
use marker::Sized;
47-
4845
pub type GlueFn = extern "Rust" fn(*const i8);
4946

5047
#[lang="ty_desc"]
@@ -203,9 +200,6 @@ extern "rust-intrinsic" {
203200
/// Gets an identifier which is globally unique to the specified type. This
204201
/// function will return the same value for a type regardless of whichever
205202
/// crate it is invoked in.
206-
#[cfg(not(stage0))]
207-
pub fn type_id<T: ?Sized + 'static>() -> TypeId;
208-
#[cfg(stage0)]
209203
pub fn type_id<T: 'static>() -> TypeId;
210204

211205
/// Create a value initialized to zero.
@@ -556,19 +550,9 @@ pub struct TypeId {
556550
}
557551

558552
impl TypeId {
559-
/// Returns the `TypeId` of the type this generic function has been
560-
/// instantiated with
561-
#[cfg(stage0)]
553+
/// Returns the `TypeId` of the type this generic function has been instantiated with
562554
pub fn of<T: 'static>() -> TypeId {
563555
unsafe { type_id::<T>() }
564556
}
565-
566-
/// Returns the `TypeId` of the type this generic function has been
567-
/// instantiated with
568-
#[cfg(not(stage0))]
569-
pub fn of<T: ?Sized + 'static>() -> TypeId {
570-
unsafe { type_id::<T>() }
571-
}
572-
573557
pub fn hash(&self) -> u64 { self.t }
574558
}

0 commit comments

Comments
 (0)