Skip to content

Representation of structs #11

Closed
Closed
@nikomatsakis

Description

@nikomatsakis

Discussion topic about how structs are represented in Rust. Some things to work out:

  • Do we ever say anything about how a #[repr(rust)] struct is laid out
    (and/or treated by the ABI)?
    - e.g., what about different structs with same definition
    - across executions of the same program?
  • For example, rkruppe writes that we might "want to guarantee (some subset of) newtype unpacking and relegate #[repr(transparent)] to being the way to guarantee to other crates that a type with private fields is and will remain a newtype?"
  • When is interop with #[rust(C)] guaranteed and what can we say there?

Metadata

Metadata

Assignees

Labels

A-layoutTopic: Related to data structure layout (`#[repr]`)S-writeup-assignedStatus: Ready for a writeup and someone is assigned to it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions