-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typeck: don't suggest inaccessible private fields #76524
Merged
bors
merged 2 commits into
rust-lang:master
from
davidtwco:issue-76077-inaccessible-private-fields
Sep 10, 2020
Merged
typeck: don't suggest inaccessible private fields #76524
bors
merged 2 commits into
rust-lang:master
from
davidtwco:issue-76077-inaccessible-private-fields
Sep 10, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Sep 9, 2020
estebank
approved these changes
Sep 10, 2020
davidtwco
force-pushed
the
issue-76077-inaccessible-private-fields
branch
from
September 10, 2020 11:51
8530836
to
786ba36
Compare
estebank
reviewed
Sep 10, 2020
estebank
reviewed
Sep 10, 2020
@bors r+ Approving. Feel free to change the wording of the message and reapprove, but otherwise we can do it at a later time. |
📌 Commit 786ba36acff04c1ae3e44895a4d30053f495b3d5 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Sep 10, 2020
This commit adjusts the missing field diagnostic logic for struct expressions in typeck to improve the diagnostic when the missing fields are inaccessible. Signed-off-by: David Wood <david@davidtw.co>
This commit adjusts the missing field diagnostic logic for struct patterns in typeck to improve the diagnostic when the missing fields are inaccessible. Signed-off-by: David Wood <david@davidtw.co>
davidtwco
force-pushed
the
issue-76077-inaccessible-private-fields
branch
from
September 10, 2020 17:52
786ba36
to
409c141
Compare
@bors r+ |
📌 Commit 409c141 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 10, 2020
Rollup of 11 pull requests Successful merges: - rust-lang#75857 (Syntactically permit unsafety on mods) - rust-lang#76289 (Add docs about crate level documentation support) - rust-lang#76514 (Add revisions to const generic issue UI tests.) - rust-lang#76524 (typeck: don't suggest inaccessible private fields) - rust-lang#76548 (Validate removal of AscribeUserType, FakeRead, and Shallow borrow) - rust-lang#76555 (Reword `trivial_casts` lint in rustc book to better explain what it does.) - rust-lang#76559 (add the `const_evaluatable_checked` feature) - rust-lang#76563 (small typo fix in rustc_parse docs) - rust-lang#76565 (take reference to Place directly instead of taking reference to Box<Place>) - rust-lang#76567 (use push(char) to add chars (single-char &strs) to strings instead of push_str(&str)) - rust-lang#76568 (Add missing examples on core traits' method) Failed merges: r? `@ghost`
bors
added a commit
to rust-lang/cargo
that referenced
this pull request
Dec 2, 2020
Fix semver documentation tests. GitHub just updated the VM image to include the latest stable rust (1.48), which included some minor changes to diagnostic outputs. This updates the semver chapter tests which validates that the correct error is displayed for the 1.48 release. These diagnostics were changed via rust-lang/rust#76524 and rust-lang/rust#73996.
ehuss
pushed a commit
to ehuss/cargo
that referenced
this pull request
Dec 4, 2020
Fix semver documentation tests. GitHub just updated the VM image to include the latest stable rust (1.48), which included some minor changes to diagnostic outputs. This updates the semver chapter tests which validates that the correct error is displayed for the 1.48 release. These diagnostics were changed via rust-lang/rust#76524 and rust-lang/rust#73996.
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Aug 10, 2021
typeck: don't suggest inaccessible fields in struct literals and suggest ignoring inaccessible fields in struct patterns Fixes rust-lang#87872. This PR adjusts the missing field diagnostic logic in typeck so that when any of the missing fields in a struct literal or pattern is inaccessible then the error is less confusing, even if some of the missing fields are accessible. See also rust-lang#76524.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #76077.
This PR adjusts the missing field diagnostic logic in typeck so that when none of the missing fields in a struct expr are accessible then the error is less confusing.
r? @estebank