rust-lang / rust-lang/fls

#[repr(C)] not necessarily compatible with C

Open
#152 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-type-layout
Dominant language
reStructuredText
Stars
497
Forks
41
Avg merge
3h 52m
Merged PRs (30d)
4

Description

https://spec.ferrocene.dev/types-and-traits.html#type-representation

It was discovered^bug-report that for MSVC compilers certain cases around ZST's and packed structs have a different memory layout than what rustc does on every platform.

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

Read the type representation section at spec.ferrocene.dev/types-and-traits.html#type-representation, then compare its #[repr(C)] rules with the linked rustc issue 81996. Confirm the MSVC differences for zero-sized types and packed structs, and update the specification so its stated layout compatibility matches the relevant behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.