Skip to content

Commit

Permalink
Unrolled build for rust-lang#134022
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#134022 - shahn:doc_clarify_extend_for_tuple_version, r=tgross35

Doc: Extend for tuples to be stabilized in 1.85.0

I assumed the RUSTC_CURRENT_VERSION would be replaced automatically, but it doesn't look like it on the nightly docs page. Sorry!
  • Loading branch information
rust-timer authored Dec 15, 2024
2 parents b57d93d + 7717df2 commit 335dc82
Showing 1 changed file with 56 additions and 7 deletions.
63 changes: 56 additions & 7 deletions library/core/src/iter/traits/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,15 +493,64 @@ impl Extend<()> for () {
}

macro_rules! spec_tuple_impl {
( ($ty_name:ident, $var_name:ident, $extend_ty_name: ident, $trait_name:ident, $default_fn_name:ident, $cnt:tt), ) => {
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),);
(
(
$ty_name:ident, $var_name:ident, $extend_ty_name: ident,
$trait_name:ident, $default_fn_name:ident, $cnt:tt
),
) => {
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 \
CURRENT_RUSTC_VERSION."]
=> ($ty_name, $var_name, $extend_ty_name, $cnt),
);
};
( ($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),)*) => {

spec_tuple_impl!($(($ty_names, $var_names, $extend_ty_names, $trait_names, $default_fn_names, $cnts),)*);
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),)*);
(
(
$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
),
)*
) => {
spec_tuple_impl!(
$(
(
$ty_names, $var_names, $extend_ty_names,
$trait_names, $default_fn_names, $cnts
),
)*
);
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
),
)*
);
};
($trait_name:ident, $default_fn_name:ident, #[$meta:meta] $(#[$doctext:meta])? => $(($ty_names:ident, $var_names:ident, $extend_ty_names:ident, $cnts:tt),)*) => {
(
$trait_name:ident, $default_fn_name:ident, #[$meta:meta]
$(#[$doctext:meta])? => $(
(
$ty_names:ident, $var_names:ident, $extend_ty_names:ident, $cnts:tt
),
)*
) => {
#[$meta]
$(#[$doctext])?
#[stable(feature = "extend_for_tuple", since = "1.56.0")]
Expand Down

0 comments on commit 335dc82

Please sign in to comment.