@@ -36,7 +36,7 @@ mod private {
36
36
37
37
/// A unique identifier for anything that we create a debuginfo node for.
38
38
/// The types it contains are expected to already be normalized (which
39
- /// is debug_asserted in the constructors).
39
+ /// is asserted in the constructors).
40
40
///
41
41
/// Note that there are some things that only show up in debuginfo, like
42
42
/// the separate type descriptions for each enum variant. These get an ID
@@ -58,12 +58,12 @@ pub(super) enum UniqueTypeId<'tcx> {
58
58
59
59
impl < ' tcx > UniqueTypeId < ' tcx > {
60
60
pub fn for_ty ( tcx : TyCtxt < ' tcx > , t : Ty < ' tcx > ) -> Self {
61
- debug_assert_eq ! ( t, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , t) ) ;
61
+ assert_eq ! ( t, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , t) ) ;
62
62
UniqueTypeId :: Ty ( t, private:: HiddenZst )
63
63
}
64
64
65
65
pub fn for_enum_variant_part ( tcx : TyCtxt < ' tcx > , enum_ty : Ty < ' tcx > ) -> Self {
66
- debug_assert_eq ! ( enum_ty, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , enum_ty) ) ;
66
+ assert_eq ! ( enum_ty, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , enum_ty) ) ;
67
67
UniqueTypeId :: VariantPart ( enum_ty, private:: HiddenZst )
68
68
}
69
69
@@ -72,7 +72,7 @@ impl<'tcx> UniqueTypeId<'tcx> {
72
72
enum_ty : Ty < ' tcx > ,
73
73
variant_idx : VariantIdx ,
74
74
) -> Self {
75
- debug_assert_eq ! ( enum_ty, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , enum_ty) ) ;
75
+ assert_eq ! ( enum_ty, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , enum_ty) ) ;
76
76
UniqueTypeId :: VariantStructType ( enum_ty, variant_idx, private:: HiddenZst )
77
77
}
78
78
@@ -81,7 +81,7 @@ impl<'tcx> UniqueTypeId<'tcx> {
81
81
enum_ty : Ty < ' tcx > ,
82
82
variant_idx : VariantIdx ,
83
83
) -> Self {
84
- debug_assert_eq ! ( enum_ty, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , enum_ty) ) ;
84
+ assert_eq ! ( enum_ty, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , enum_ty) ) ;
85
85
UniqueTypeId :: VariantStructTypeCppLikeWrapper ( enum_ty, variant_idx, private:: HiddenZst )
86
86
}
87
87
@@ -90,11 +90,8 @@ impl<'tcx> UniqueTypeId<'tcx> {
90
90
self_type : Ty < ' tcx > ,
91
91
implemented_trait : Option < PolyExistentialTraitRef < ' tcx > > ,
92
92
) -> Self {
93
- debug_assert_eq ! (
94
- self_type,
95
- tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , self_type)
96
- ) ;
97
- debug_assert_eq ! (
93
+ assert_eq ! ( self_type, tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , self_type) ) ;
94
+ assert_eq ! (
98
95
implemented_trait,
99
96
tcx. normalize_erasing_regions( ParamEnv :: reveal_all( ) , implemented_trait)
100
97
) ;
@@ -252,10 +249,7 @@ pub(super) fn build_type_with_children<'ll, 'tcx>(
252
249
members : impl FnOnce ( & CodegenCx < ' ll , ' tcx > , & ' ll DIType ) -> SmallVec < & ' ll DIType > ,
253
250
generics : impl FnOnce ( & CodegenCx < ' ll , ' tcx > ) -> SmallVec < & ' ll DIType > ,
254
251
) -> DINodeCreationResult < ' ll > {
255
- debug_assert_eq ! (
256
- debug_context( cx) . type_map. di_node_for_unique_id( stub_info. unique_type_id) ,
257
- None
258
- ) ;
252
+ assert_eq ! ( debug_context( cx) . type_map. di_node_for_unique_id( stub_info. unique_type_id) , None ) ;
259
253
260
254
debug_context ( cx) . type_map . insert ( stub_info. unique_type_id , stub_info. metadata ) ;
261
255
0 commit comments