-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Type called union wreaks havoc since 1.54 #88583
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-criticalCritical priorityCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.P-criticalCritical priorityCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
When C-compatible untagged unions were introduced by RFC 1444, it was careful not to break existing valid uses of
unionidentifier, such as https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.union.However, the unions from RFC 2102 (#49804) appear to be more disruptive, at least as currently implemented. The following stable code works with every stable rustc from 1.0.0 through 1.53.0, but can no longer be parsed by rustc 1.54.0 or current nightly.
@jedel1043 @joshtriplett
Labeling T-compiler for what to do about the regression and T-lang because it's not clear to me what the grammar of anonymous union is intended to be from the parser's perspective.