about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2017-10-16 10:45:23 -0300
committerSantiago Pastorino <spastorino@gmail.com>2017-10-17 12:06:20 -0300
commitb8f981a149ddbfdfa943d05a30710bafdf2f9522 (patch)
tree2f243725e15e24cdb607b8d9b4ca9dc90642db61 /src/librustc_data_structures
parentabe7c87eefe4a15b7e83feb6b8962ae15452c16c (diff)
downloadrust-b8f981a149ddbfdfa943d05a30710bafdf2f9522.tar.gz
rust-b8f981a149ddbfdfa943d05a30710bafdf2f9522.zip
Generate FirstStatementIndex using newtype_index macro
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/indexed_vec.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_data_structures/indexed_vec.rs b/src/librustc_data_structures/indexed_vec.rs
index 6c5a37aa1e5..1d1b367de20 100644
--- a/src/librustc_data_structures/indexed_vec.rs
+++ b/src/librustc_data_structures/indexed_vec.rs
@@ -65,7 +65,7 @@ macro_rules! newtype_index {
     (@type[$type:ident] @max[$max:expr] @debug_name[$debug_name:expr]) => (
         #[derive(Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord,
             RustcEncodable, RustcDecodable)]
-        pub struct $type(u32);
+        pub struct $type(pub u32);
 
         impl Idx for $type {
             fn new(value: usize) -> Self {
@@ -99,7 +99,7 @@ macro_rules! newtype_index {
     // Replace existing default for max
     (@type[$type:ident] @max[$_max:expr] @debug_name[$debug_name:expr]
             MAX = $max:expr, $($tokens:tt)*) => (
-        newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $(tokens)*);
+        newtype_index!(@type[$type] @max[$max] @debug_name[$debug_name] $($tokens)*);
     );
 
     // Replace existing default for debug_name