From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_metadata/src/rmeta/table.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_metadata/src/rmeta/table.rs') diff --git a/compiler/rustc_metadata/src/rmeta/table.rs b/compiler/rustc_metadata/src/rmeta/table.rs index 21841ae25..e7c1abd12 100644 --- a/compiler/rustc_metadata/src/rmeta/table.rs +++ b/compiler/rustc_metadata/src/rmeta/table.rs @@ -10,7 +10,6 @@ use rustc_span::hygiene::MacroKind; use std::convert::TryInto; use std::marker::PhantomData; use std::num::NonZeroUsize; -use tracing::debug; /// Helper trait, for encoding to, and decoding from, a fixed number of bytes. /// Used mainly for Lazy positions and lengths. @@ -51,7 +50,7 @@ macro_rules! fixed_size_enum { } match b[0] - 1 { $(${index()} => Some($($pat)*),)* - _ => panic!("Unexpected ImplPolarity code: {:?}", b[0]), + _ => panic!("Unexpected {} code: {:?}", stringify!($ty), b[0]), } } @@ -91,6 +90,7 @@ fixed_size_enum! { ( AnonConst ) ( InlineConst ) ( OpaqueTy ) + ( ImplTraitPlaceholder ) ( Field ) ( LifetimeParam ) ( GlobalAsm ) @@ -141,6 +141,21 @@ fixed_size_enum! { } } +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 { type ByteArray = [u8; 16]; -- cgit v1.2.3