Skip to content

Regression on privacy field of struct used in ..some_struct syntax #70323

Closed
@estebank

Description

@estebank

In a recent PR #69942 I made a change to unify the wording of multiple privacy errors, but accidentally regressed the following case:

error[E0451]: field `secret_uid` of struct `foo::S` is private
  --> $DIR/functional-struct-update-respects-privacy.rs:28:49
   |
LL |     let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
   |                                                 ^^^ private field

used to be

error[E0451]: field `secret_uid` of struct `foo::S` is private
  --> $DIR/functional-struct-update-respects-privacy.rs:28:49
   |
LL |     let s_2 = foo::S { b: format!("ess two"), ..s_1 }; // FRU ...
   |                                                 ^^^ field `secret_uid` is private

This one change needs to be reversed while keeping the rest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsD-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.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

    No branches or pull requests

    Issue actions