Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk

Remove unsizing coercions for tuples

See https://github.com/rust-lang/rust/issues/42877#issuecomment-2686010847 and below comments for justification.

Tracking issue: #42877
Fixes: #135217
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-03-05 21:46:44 +08:00 committed by GitHub
commit 257b4947ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 56 additions and 878 deletions

View file

@ -244,6 +244,8 @@ declare_features! (
/// Allows unnamed fields of struct and union type
(removed, unnamed_fields, "1.83.0", Some(49804), Some("feature needs redesign")),
(removed, unsafe_no_drop_flag, "1.0.0", None, None),
(removed, unsized_tuple_coercion, "CURRENT_RUSTC_VERSION", Some(42877),
Some("The feature restricts possible layouts for tuples, and this restriction is not worth it.")),
/// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue.
(removed, untagged_unions, "1.13.0", Some(55149),
Some("unions with `Copy` and `ManuallyDrop` fields are stable; there is no intent to stabilize more")),

View file

@ -659,8 +659,6 @@ declare_features! (
(internal, unsized_fn_params, "1.49.0", Some(48055)),
/// Allows unsized rvalues at arguments and parameters.
(incomplete, unsized_locals, "1.30.0", Some(48055)),
/// Allows unsized tuple coercion.
(unstable, unsized_tuple_coercion, "1.20.0", Some(42877)),
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
(unstable, used_with_arg, "1.60.0", Some(93798)),
/// Allows use of attributes in `where` clauses.