Skip to content

E0277 for unions only mentions structs and enum variants #36312

Closed
@apasel422

Description

@apasel422

The note issued for the following is "only the last field of a struct or enum variant may have a dynamically sized type," which is confusing, since no struct or enum variant is used:

#![feature(untagged_unions)]

union Foo<T: ?Sized> {
    value: T,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions