@@ -158,7 +158,7 @@ macro_rules! define_index_type {
158
158
(
159
159
$( #[ $attrs: meta] ) *
160
160
$v: vis struct $type: ident = $raw: ident;
161
- $( $CONFIG_NAME: ident = $value: expr ; ) * $( ; ) ?
161
+ $( $CONFIG_NAME: ident = $value: expr_2021 ; ) * $( ; ) ?
162
162
) => {
163
163
$crate:: __define_index_type_inner!{
164
164
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -214,13 +214,13 @@ macro_rules! __internal_maybe_index_impl_serde {
214
214
macro_rules! __define_index_type_inner {
215
215
// DISABLE_MAX_INDEX_CHECK
216
216
(
217
- @configs [ ( DISABLE_MAX_INDEX_CHECK ; $no_check_max: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
217
+ @configs [ ( DISABLE_MAX_INDEX_CHECK ; $no_check_max: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
218
218
@attrs [ $( #[ $attrs: meta] ) * ]
219
219
@derives [ $( #[ $derive: meta] ) * ]
220
220
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
221
- @debug_fmt [ $dbg: expr ]
222
- @max [ $max: expr ]
223
- @no_check_max [ $_old_no_check_max: expr ]
221
+ @debug_fmt [ $dbg: expr_2021 ]
222
+ @max [ $max: expr_2021 ]
223
+ @no_check_max [ $_old_no_check_max: expr_2021 ]
224
224
) => {
225
225
$crate:: __define_index_type_inner!{
226
226
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -235,13 +235,13 @@ macro_rules! __define_index_type_inner {
235
235
236
236
// MAX_INDEX
237
237
(
238
- @configs [ ( MAX_INDEX ; $new_max: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
238
+ @configs [ ( MAX_INDEX ; $new_max: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
239
239
@attrs [ $( #[ $attrs: meta] ) * ]
240
240
@derives [ $( #[ $derive: meta] ) * ]
241
241
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
242
- @debug_fmt [ $dbg: expr ]
243
- @max [ $max: expr ]
244
- @no_check_max [ $cm: expr ]
242
+ @debug_fmt [ $dbg: expr_2021 ]
243
+ @max [ $max: expr_2021 ]
244
+ @no_check_max [ $cm: expr_2021 ]
245
245
) => {
246
246
$crate:: __define_index_type_inner!{
247
247
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -256,13 +256,13 @@ macro_rules! __define_index_type_inner {
256
256
257
257
// DEFAULT
258
258
(
259
- @configs [ ( DEFAULT ; $default_expr: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
259
+ @configs [ ( DEFAULT ; $default_expr: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
260
260
@attrs [ $( #[ $attrs: meta] ) * ]
261
261
@derives [ $( #[ $derive: meta] ) * ]
262
262
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
263
- @debug_fmt [ $dbg: expr ]
264
- @max [ $max: expr ]
265
- @no_check_max [ $no_check_max: expr ]
263
+ @debug_fmt [ $dbg: expr_2021 ]
264
+ @max [ $max: expr_2021 ]
265
+ @no_check_max [ $no_check_max: expr_2021 ]
266
266
) => {
267
267
$crate:: __define_index_type_inner!{
268
268
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -283,13 +283,13 @@ macro_rules! __define_index_type_inner {
283
283
284
284
// DEBUG_FORMAT
285
285
(
286
- @configs [ ( DEBUG_FORMAT ; $dbg: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
286
+ @configs [ ( DEBUG_FORMAT ; $dbg: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
287
287
@attrs [ $( #[ $attrs: meta] ) * ]
288
288
@derives [ $( #[ $derive: meta] ) * ]
289
289
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
290
- @debug_fmt [ $old_dbg: expr ]
291
- @max [ $max: expr ]
292
- @no_check_max [ $no_check_max: expr ]
290
+ @debug_fmt [ $old_dbg: expr_2021 ]
291
+ @max [ $max: expr_2021 ]
292
+ @no_check_max [ $no_check_max: expr_2021 ]
293
293
) => {
294
294
$crate:: __define_index_type_inner!{
295
295
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -304,13 +304,13 @@ macro_rules! __define_index_type_inner {
304
304
305
305
// DISPLAY_FORMAT
306
306
(
307
- @configs [ ( DISPLAY_FORMAT ; $format: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
307
+ @configs [ ( DISPLAY_FORMAT ; $format: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
308
308
@attrs [ $( #[ $attrs: meta] ) * ]
309
309
@derives [ $( #[ $derive: meta] ) * ]
310
310
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
311
- @debug_fmt [ $dbg: expr ]
312
- @max [ $max: expr ]
313
- @no_check_max [ $no_check_max: expr ]
311
+ @debug_fmt [ $dbg: expr_2021 ]
312
+ @max [ $max: expr_2021 ]
313
+ @no_check_max [ $no_check_max: expr_2021 ]
314
314
) => {
315
315
$crate:: __define_index_type_inner!{
316
316
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -331,13 +331,13 @@ macro_rules! __define_index_type_inner {
331
331
332
332
// IMPL_RAW_CONVERSIONS
333
333
(
334
- @configs [ ( IMPL_RAW_CONVERSIONS ; $val: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
334
+ @configs [ ( IMPL_RAW_CONVERSIONS ; $val: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
335
335
@attrs [ $( #[ $attrs: meta] ) * ]
336
336
@derives [ $( #[ $derive: meta] ) * ]
337
337
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
338
- @debug_fmt [ $dbg: expr ]
339
- @max [ $max: expr ]
340
- @no_check_max [ $no_check_max: expr ]
338
+ @debug_fmt [ $dbg: expr_2021 ]
339
+ @max [ $max: expr_2021 ]
340
+ @no_check_max [ $no_check_max: expr_2021 ]
341
341
) => {
342
342
$crate:: __define_index_type_inner!{
343
343
@configs [ $( ( $CONFIG_NAME; $value) ) * ]
@@ -367,13 +367,13 @@ macro_rules! __define_index_type_inner {
367
367
} ;
368
368
// Try to make rust emit a decent error message...
369
369
(
370
- @configs [ ( $other: ident; $format: expr ) $( ( $CONFIG_NAME: ident; $value: expr ) ) * ]
370
+ @configs [ ( $other: ident; $format: expr_2021 ) $( ( $CONFIG_NAME: ident; $value: expr_2021 ) ) * ]
371
371
@attrs [ $( #[ $attrs: meta] ) * ]
372
372
@derives [ $( #[ $derive: meta] ) * ]
373
373
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
374
- @debug_fmt [ $dbg: expr ]
375
- @max [ $max: expr ]
376
- @no_check_max [ $no_check_max: expr ]
374
+ @debug_fmt [ $dbg: expr_2021 ]
375
+ @max [ $max: expr_2021 ]
376
+ @no_check_max [ $no_check_max: expr_2021 ]
377
377
) => {
378
378
$crate:: unknown_define_index_type_option!( $other) ;
379
379
} ;
@@ -383,9 +383,9 @@ macro_rules! __define_index_type_inner {
383
383
@attrs [ $( #[ $attrs: meta] ) * ]
384
384
@derives [ $( #[ $derive: meta] ) * ]
385
385
@decl [ $v: vis struct $type: ident ( $raw: ident) ]
386
- @debug_fmt [ $dbg: expr ]
387
- @max [ $max: expr ]
388
- @no_check_max [ $no_check_max: expr ]
386
+ @debug_fmt [ $dbg: expr_2021 ]
387
+ @max [ $max: expr_2021 ]
388
+ @no_check_max [ $no_check_max: expr_2021 ]
389
389
) => {
390
390
391
391
$( #[ $derive] ) *
@@ -422,7 +422,7 @@ macro_rules! __define_index_type_inner {
422
422
}
423
423
424
424
/// Construct from a usize without any checks.
425
- #[ allow ( clippy:: cast_possible_truncation) ]
425
+ #[ expect ( clippy:: cast_possible_truncation) ]
426
426
#[ inline( always) ]
427
427
$v const fn from_usize_unchecked( value: usize ) -> Self {
428
428
Self { _raw: value as $raw }
@@ -435,7 +435,7 @@ macro_rules! __define_index_type_inner {
435
435
}
436
436
437
437
/// Construct this index type from a usize.
438
- #[ allow ( clippy:: cast_possible_truncation) ]
438
+ #[ expect ( clippy:: cast_possible_truncation) ]
439
439
#[ inline]
440
440
$v fn from_usize( value: usize ) -> Self {
441
441
Self :: check_index( value as usize ) ;
0 commit comments