Skip to content

newtype structs and tuple structs should have (or just allow) priv fields #5489

Closed
@thestinger

Description

@thestinger
Contributor

At the moment a newtype struct can just be constructed and used as the original type with a dereference outside of the module. It's not possible to use them as an independent new type.

Activity

alexcrichton

alexcrichton commented on May 20, 2013

@alexcrichton
Member

Nominating for feature-complete

graydon

graydon commented on May 23, 2013

@graydon
Contributor

closing INVALID, we don't have privacy on tuples; make a field name if you want privacy

added a commit that references this issue on May 2, 2020

Auto merge of rust-lang#5489 - phansch:node-id-hir-id, r=flip1995

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@alexcrichton@thestinger

        Issue actions

          newtype structs and tuple structs should have (or just allow) priv fields · Issue #5489 · rust-lang/rust