rust-lang / rust-lang/fls

Vague Union Legality Rules (4.4.3)

Open
#141 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-content A-unions C-enhancement
Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

4.4.3:1 A union type is an abstract data type similar to a C-like union.

This isn't sufficient and improperly permissive. Rust rules for unions will have some mismatch with C unions. It does not defined (subsets of) the permitted values as per B.509. type, making unions effectively uninstantiable.

See also: ongoing internal discussion

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading section 4.4.3 and the referenced B.509 type definition, then review the linked unsafe-code-guidelines discussion. The work is complete when the specification defines the permitted values for union types and resolves their instantiability without relying on the current C-union wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.