Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bfd2bc3

Browse files
committedDec 14, 2024
Correct spelling of CURRENT_RUSTC_VERSION
I mixed it up with RUSTC_CURRENT_VERSION unfortunately. Also improve the formatting of the macro invocation slightly. Thanks @tgross35!
1 parent 9c707a8 commit bfd2bc3

File tree

1 file changed

+46
-7
lines changed

1 file changed

+46
-7
lines changed
 

‎library/core/src/iter/traits/collect.rs

+46-7
Original file line numberDiff line numberDiff line change
@@ -493,15 +493,54 @@ impl Extend<()> for () {
493493
}
494494

495495
macro_rules! spec_tuple_impl {
496-
( ($ty_name:ident, $var_name:ident, $extend_ty_name: ident, $trait_name:ident, $default_fn_name:ident, $cnt:tt), ) => {
497-
spec_tuple_impl!($trait_name, $default_fn_name, #[doc(fake_variadic)] #[doc = "This trait is implemented for tuples up to twelve items long. The `impl`s for 1- and 3- through 12-ary tuples were stabilized after 2-tuples, in RUSTC_CURRENT_VERSION."] => ($ty_name, $var_name, $extend_ty_name, $cnt),);
496+
(
497+
(
498+
$ty_name:ident, $var_name:ident, $extend_ty_name: ident,
499+
$trait_name:ident, $default_fn_name:ident, $cnt:tt
500+
),
501+
) => {
502+
spec_tuple_impl!(
503+
$trait_name,
504+
$default_fn_name,
505+
#[doc(fake_variadic)]
506+
#[doc = "This trait is implemented for tuples up to twelve items long. The `impl`s for\
507+
1- and 3- through 12-ary tuples were stabilized after 2-tuples, in\
508+
CURRENT_RUSTC_VERSION."]
509+
=> ($ty_name, $var_name, $extend_ty_name, $cnt),
510+
);
498511
};
499-
( ($ty_name:ident, $var_name:ident, $extend_ty_name: ident, $trait_name:ident, $default_fn_name:ident, $cnt:tt), $(($ty_names:ident, $var_names:ident, $extend_ty_names:ident, $trait_names:ident, $default_fn_names:ident, $cnts:tt),)*) => {
500-
501-
spec_tuple_impl!($(($ty_names, $var_names, $extend_ty_names, $trait_names, $default_fn_names, $cnts),)*);
502-
spec_tuple_impl!($trait_name, $default_fn_name, #[doc(hidden)] => ($ty_name, $var_name, $extend_ty_name, $cnt), $(($ty_names, $var_names, $extend_ty_names, $cnts),)*);
512+
(
513+
(
514+
$ty_name:ident, $var_name:ident, $extend_ty_name: ident,
515+
$trait_name:ident, $default_fn_name:ident, $cnt:tt
516+
),
517+
$(
518+
(
519+
$ty_names:ident, $var_names:ident, $extend_ty_names:ident,
520+
$trait_names:ident, $default_fn_names:ident, $cnts:tt
521+
),
522+
)*
523+
) => {
524+
spec_tuple_impl!(
525+
$(
526+
(
527+
$ty_names, $var_names, $extend_ty_names,
528+
$trait_names, $default_fn_names, $cnts
529+
),
530+
)*
531+
);
532+
spec_tuple_impl!(
533+
$trait_name, $default_fn_name, #[doc(hidden)] => ($ty_name, $var_name, $extend_ty_name, $cnt), $(($ty_names, $var_names, $extend_ty_names, $cnts),)*
534+
);
503535
};
504-
($trait_name:ident, $default_fn_name:ident, #[$meta:meta] $(#[$doctext:meta])? => $(($ty_names:ident, $var_names:ident, $extend_ty_names:ident, $cnts:tt),)*) => {
536+
(
537+
$trait_name:ident, $default_fn_name:ident, #[$meta:meta]
538+
$(#[$doctext:meta])? => $(
539+
(
540+
$ty_names:ident, $var_names:ident, $extend_ty_names:ident, $cnts:tt
541+
),
542+
)*
543+
) => {
505544
#[$meta]
506545
$(#[$doctext])?
507546
#[stable(feature = "extend_for_tuple", since = "1.56.0")]

0 commit comments

Comments
 (0)
Failed to load comments.