Skip to content

Allocation::bytes should be private #62931

@RalfJung

Description

@RalfJung
Member

The bytes field of an Allocation is a very subtle one -- the values in there often do not mean what one might intuitively think. First of all the doc comment should probably be improved, but secondly I think we need to make this field private. See #62655 (comment) for a very subtle bug that happened because it was not private.

Cc @oli-obk @eddyb

Activity

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Jul 24, 2019
eddyb

eddyb commented on Jul 24, 2019

@eddyb
Member

Might also help to rename it to something like unrelocated_bytes.

RalfJung

RalfJung commented on Jul 24, 2019

@RalfJung
MemberAuthor

unrelocated_raw_maybe_initialized_bytes_dont_touch

added a commit that references this issue on Sep 2, 2019
b505208
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @eddyb@RalfJung@jonas-schievink

      Issue actions

        Allocation::bytes should be private · Issue #62931 · rust-lang/rust