@@ -142,32 +142,38 @@ macro_rules! define_label {
142
142
}
143
143
}
144
144
145
- #[ expect( clippy:: allow_attributes, reason = "Expect would break upon stabilization" ) ]
146
- #[ allow( unknown_or_malformed_diagnostic_attributes,
147
- reason = "do_not_recommend is not stable yet"
148
- ) ]
149
- #[ diagnostic:: do_not_recommend]
150
- impl $label_trait_name for $crate:: intern:: Interned <dyn $label_trait_name> {
151
-
152
- $( $interned_extra_methods_impl) *
153
-
154
- fn dyn_clone( & self ) -> $crate:: label:: Box <dyn $label_trait_name> {
155
- ( * * self ) . dyn_clone( )
156
- }
157
-
158
- /// Casts this value to a form where it can be compared with other type-erased values.
159
- fn as_dyn_eq( & self ) -> & dyn $crate:: label:: DynEq {
160
- ( * * self ) . as_dyn_eq( )
145
+ const _: ( ) = {
146
+ #[ expect( clippy:: allow_attributes, reason = "Expect would break upon stabilization" ) ]
147
+ #[ allow( unknown_or_malformed_diagnostic_attributes,
148
+ reason = "do_not_recommend is not stable yet"
149
+ ) ]
150
+ mod with_lint_workaround {
151
+ use super :: * ;
152
+
153
+ #[ diagnostic:: do_not_recommend]
154
+ impl $label_trait_name for $crate:: intern:: Interned <dyn $label_trait_name> {
155
+
156
+ $( $interned_extra_methods_impl) *
157
+
158
+ fn dyn_clone( & self ) -> $crate:: label:: Box <dyn $label_trait_name> {
159
+ ( * * self ) . dyn_clone( )
160
+ }
161
+
162
+ /// Casts this value to a form where it can be compared with other type-erased values.
163
+ fn as_dyn_eq( & self ) -> & dyn $crate:: label:: DynEq {
164
+ ( * * self ) . as_dyn_eq( )
165
+ }
166
+
167
+ fn dyn_hash( & self , state: & mut dyn :: core:: hash:: Hasher ) {
168
+ ( * * self ) . dyn_hash( state) ;
169
+ }
170
+
171
+ fn intern( & self ) -> Self {
172
+ * self
173
+ }
174
+ }
161
175
}
162
-
163
- fn dyn_hash( & self , state: & mut dyn :: core:: hash:: Hasher ) {
164
- ( * * self ) . dyn_hash( state) ;
165
- }
166
-
167
- fn intern( & self ) -> Self {
168
- * self
169
- }
170
- }
176
+ } ;
171
177
172
178
impl PartialEq for dyn $label_trait_name {
173
179
fn eq( & self , other: & Self ) -> bool {
0 commit comments