about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/indexed_vec.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs
index 01fb2930687..82882f94440 100644
--- a/src/librustc_data_structures/indexed_vec.rs
+++ b/src/librustc_data_structures/indexed_vec.rs
@@ -40,6 +40,10 @@ impl Idx for u32 {
 
 #[macro_export]
 macro_rules! newtype_index {
+    ($name:ident) => (
+        newtype_index!($name, unsafe { ::std::intrinsics::type_name::<$name>() });
+    );
+
     ($name:ident, $debug_name:expr) => (
         #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord,
          RustcEncodable, RustcDecodable)]