]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_metadata/src/rmeta/table.rs
Rollup merge of #101429 - compiler-errors:issue-101119, r=lcnr
[rust.git] / compiler / rustc_metadata / src / rmeta / table.rs
index 8085675d75cc549eafb86b03c64b7d6131f0aa53..d5f151f0ed8e50a4116de32d27be14044bf589eb 100644 (file)
@@ -50,7 +50,7 @@ impl FixedSizeEncoding for Option<$ty> {
                 }
                 match b[0] - 1 {
                     $(${index()} => Some($($pat)*),)*
-                    _ => panic!("Unexpected ImplPolarity code: {:?}", b[0]),
+                    _ => panic!("Unexpected {} code: {:?}", stringify!($ty), b[0]),
                 }
             }
 
@@ -140,6 +140,21 @@ impl FixedSizeEncoding for Option<$ty> {
     }
 }
 
+fixed_size_enum! {
+    ty::AssocItemContainer {
+        ( TraitContainer )
+        ( ImplContainer  )
+    }
+}
+
+fixed_size_enum! {
+    MacroKind {
+        ( Attr   )
+        ( Bang   )
+        ( Derive )
+    }
+}
+
 // We directly encode `DefPathHash` because a `LazyValue` would incur a 25% cost.
 impl FixedSizeEncoding for Option<DefPathHash> {
     type ByteArray = [u8; 16];