-
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
Fix exposing fields marked unstable or doc hidden #90358
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
Now that final exams are over I can finish this up! @m-ou-se I collected some more feedback on converting So as long as leaving it as is (or rather as it was) sounds good to everyone I'll start by removing the commits from this PR and see if anything else has to be changed/removed so doc(hidden) items are treated as they were. |
Ping from triage: When it's ready for review send a message containing thanks. |
@JohnCSimon I am waiting for a slightly more official go-ahead to remove the special treatment of |
Sounds like you're waiting for a review; let's update the tags |
@DevinR528 is this what you were looking for? https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Should.20error.20msgs.20list.20doc.28hidden.29.20fields |
That's the one thanks @camelid ! |
I still think we should not expose doc(hidden) fields and variants through suggestions and diagnostics. This attribute is currently the only way users of stable Rust have to mark something as 'not part of the public API' for things that need to be |
I think it can now go back to: @rustbot author (but please update the labels if it's the case - thanks) |
205c1d7
to
32441a8
Compare
Ok, I'm fine with doing whatever so then the only review was from @camelid about removing the special casing of I fixed filtering |
@rustbot ready |
Sorry, I don't have enough time to take ownership of reviewing. I can try to weigh in on discussions, but that's about it. r? @wesleywiser |
☔ The latest upstream changes (presumably #94477) made this pull request unmergeable. Please resolve the merge conflicts. |
32441a8
to
9a8f487
Compare
☔ The latest upstream changes (presumably #94734) made this pull request unmergeable. Please resolve the merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nit, but r=me
| | ||
help: include the missing field in the pattern | ||
| | ||
LL | let HiddenStruct { one, hide, two } = HiddenStruct::default(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be left as followup, but ideally we should also suggest hiding in one go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if the doc(hidden)
field is being explicitly matched on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Good point. Not sure.
Needs rebase r? @jackh726 |
9a8f487
to
492d8d7
Compare
@bors r+ |
📌 Commit 492d8d7 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bbbd48f): comparison url. Summary: This benchmark run did not return any relevant results. 15 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Closes #89837
Work towards #89554
Filter fields that are marked
doc(hidden)
or are unstable with that feature turned off. This brings structs and enums into alignment behavior-wise when emitting warning/errors about pattern exhaustiveness/reachability.cc @Nadrieril