Skip to content

Document in libstd where we rely on unspecified layout details #90

Closed
@RalfJung

Description

@RalfJung

In rust-lang/rust#58582, the issue came up that libstd does things we do not permit user code to do: it relies on unspecified details of data type layout. from_raw_parts is a prime example of such code.

It'd be great if we could clearly mark every occurrence of this with comments in the standard library. This is of course directly related to the previous discussion topic where we determined what we do and do not guarantee about data type layout -- the more we guarantee, the fewer such comments are needed.

We can use this issue to collect places that do rely on unspecified layout, and then hopefully someone can prepare a PR to add appropriate comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-layoutTopic: Related to data structure layout (`#[repr]`)C-listCategory: A list/collection of some sort. Please help maintain it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions