resolve: Resolve visibilities on fields with non-builtin attributes#67106
Merged
bors merged 3 commits intorust-lang:masterfrom Dec 10, 2019
Merged
resolve: Resolve visibilities on fields with non-builtin attributes#67106bors merged 3 commits intorust-lang:masterfrom
bors merged 3 commits intorust-lang:masterfrom
Conversation
Contributor
Beta nominated for this ^. |
Contributor
matthewjasper
left a comment
There was a problem hiding this comment.
For anyone wondering what the fix is here: placeholders have inherited visibility for named fields, so the visibility of the actual field isn't being resolved for them, and so no error is reported.
r=me with the comment below addressed
Contributor
|
@petrochenkov to be clear, the beta-nomination is solely on commit 1a89f4d4d218398c0c8f99c5dabfdb8f4895fedf, right? |
Contributor
Author
|
@pnkfelix |
To avoid potential duplicate diagnostics and separate the error reporting logic
Contributor
Author
|
@bors r=matthewjasper The exact commit hashes have changed due to rebase and added tests, but the commit to backport is still the first one. |
Collaborator
|
📌 Commit 5f6267c has been approved by |
tmandry
added a commit
to tmandry/rust
that referenced
this pull request
Dec 9, 2019
resolve: Resolve visibilities on fields with non-builtin attributes Follow-up to rust-lang#66669. The first commit is primary (and also a backport candidate), the other ones are further cleanups. In this case it's not strictly necessary to avoid reporting errors during speculative resolution because 1) all visibilities are resolved non-speculatively sooner or later and 2) error reporting infrastructure merges identical errors with identical spans anyway. Fixes rust-lang#67006 r? @matthewjasper
bors
added a commit
that referenced
this pull request
Dec 10, 2019
Rollup of 11 pull requests Successful merges: - #66892 (Format libcore with rustfmt (including tests and benches)) - #67106 (resolve: Resolve visibilities on fields with non-builtin attributes) - #67113 (Print the visibility in `print_variant`.) - #67115 (Simplify `check_decl_no_pat`.) - #67119 (libstd miri tests: avoid warnings) - #67125 (Added ExactSizeIterator bound to return types) - #67138 (Simplify `Layout::extend_packed`) - #67145 (fix miri step debug printing) - #67149 (Do not ICE #67123) - #67155 (Move `Layout`s instead of binding by reference) - #67169 (inline some common methods on OsStr) Failed merges: r? @ghost
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Dec 12, 2019
resolve: Always resolve visibilities on impl items Fixes rust-lang#64705. Similarly to rust-lang#67106 this was an issue with visitor discipline. Impl items were visited as a part of visiting `ast::ItemKind::Impl`, but they should be visit-able in isolation from their parents as well, because that's how they are visited when they are expanded from macros. I've checked that all the remaining `resolve_visibility` calls are used correctly. r? @matthewjasper
Contributor
|
discussed at T-compiler meeting. accepted for beta backport. |
Merged
bors
added a commit
that referenced
this pull request
Dec 14, 2019
[beta] Beta backports Backporting the following pull requests: * resolve: Always resolve visibilities on impl items #67236 * resolve: Resolve visibilities on fields with non-builtin attributes #67106 * E0023: handle expected != tuple pattern type #67044 * Fix `unused_parens` triggers on macro by example code #66983 * Fix some issues with attributes on unnamed fields #66669 * Ensure that we get a hard error on generic ZST constants if their bodies #67134 (via #67297) Some of these conflicted on merge, I resolved where possible, sometimes by cherry-picking a commit or two more from the relevant PRs. Since those changes are necessary though for backport to proceed (otherwise not even std/core compile), seems fine -- they're fairly minor cleanups anyway.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-up to #66669.
The first commit is primary (and also a backport candidate), the other ones are further cleanups.
In this case it's not strictly necessary to avoid reporting errors during speculative resolution because 1) all visibilities are resolved non-speculatively sooner or later and 2) error reporting infrastructure merges identical errors with identical spans anyway.
Fixes #67006
r? @matthewjasper