Skip to content

Tracking Issue for relaxed struct unsizing rules #81793

Closed
@lcnr

Description

The feature gate for the issue is #![feature(relaxed_struct_unsize)].

This features changes the when a struct implements Unsize which
is required for unsize coercion.

A generic struct previously implemented Unsize if and only if:

  • the tail field depends on at least one type or const parameter
  • all type and const parameters used in the last field must only be used in the last field
  • the target struct can be created from the source by replacing only the parameters found in the last struct field
  • the tail field implements Unsize from source to target

With this feature gate the requirements are changed to:

  • the tail field depends on at least one type or const parameter not used in any other field
  • the target struct can be created from the source by replacing only the parameters only found in the last struct field
  • the tail field implements Unsize from source to target

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Implementation history

This feature has been implemented in #80726

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-relaxed_struct_unsize`#![feature(relaxed_struct_unsize)]`T-langRelevant to the language team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions