Skip to content
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

Prefer suggestion paths that are not #[doc(hidden)] #98876

Closed

Conversation

compiler-errors
Copy link
Member

This is a revival of #87349

Maybe we don't even need to make it this complicated? I guess I could also just insert children that have doc_hidden parents using the same fallback_map I added a while back to filter out use ... as _; imports.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jul 4, 2022
@rust-highfive
Copy link
Collaborator

r? @wesleywiser

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 4, 2022
@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 4, 2022
@bors
Copy link
Contributor

bors commented Jul 4, 2022

⌛ Trying commit 1b420a5 with merge d39a7f4152616d7b23d84acc0de1fecfc408585d...

@compiler-errors
Copy link
Member Author

compiler-errors commented Jul 4, 2022

(cc @In-line, I can also close this if you'd rather author this PR yourself. Just doing a diagnostics-related issue triage and I saw that PR got closed, and I think it's worthwhile to land!)

@compiler-errors compiler-errors changed the title Sort visible paths Prefer suggestion paths that are not #[doc(hidden)] Jul 4, 2022
@In-line
Copy link
Contributor

In-line commented Jul 4, 2022

I was planning to return to it, in some point. I don't care about who is author. If you have time to fix it, feel free to do it!

@bors
Copy link
Contributor

bors commented Jul 4, 2022

☀️ Try build successful - checks-actions
Build commit: d39a7f4152616d7b23d84acc0de1fecfc408585d (d39a7f4152616d7b23d84acc0de1fecfc408585d)

@rust-timer
Copy link
Collaborator

Queued d39a7f4152616d7b23d84acc0de1fecfc408585d with parent a5c6a48, future comparison URL.

@jyn514
Copy link
Member

jyn514 commented Jul 5, 2022

Hmm, if rustc is going to add this logic I wonder if it can be shared with the existing code in

pub(crate) fn inherits_doc_hidden(tcx: TyCtxt<'_>, mut node: hir::HirId) -> bool {

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d39a7f4152616d7b23d84acc0de1fecfc408585d): comparison url.

Instruction count

  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
0.5% 0.9% 22
Regressions 😿
(secondary)
1.5% 6.3% 19
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 0.5% 0.9% 22

Max RSS (memory usage)

Results
  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: 🎉 relevant improvements found
mean1 max count2
Regressions 😿
(primary)
N/A N/A 0
Regressions 😿
(secondary)
N/A N/A 0
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
-2.8% -3.2% 2
All 😿🎉 (primary) N/A N/A 0

Cycles

Results
  • Primary benchmarks: 😿 relevant regressions found
  • Secondary benchmarks: 😿 relevant regressions found
mean1 max count2
Regressions 😿
(primary)
4.3% 4.9% 2
Regressions 😿
(secondary)
4.0% 7.6% 8
Improvements 🎉
(primary)
N/A N/A 0
Improvements 🎉
(secondary)
N/A N/A 0
All 😿🎉 (primary) 4.3% 4.9% 2

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 5, 2022
@compiler-errors
Copy link
Member Author

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 5, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 26, 2022
…gillot

Prefer visibility map parents that are not `doc(hidden)` first

Far simpler approach to rust-lang#98876.

This only fixes the case where the parent is `doc(hidden)`, not where the child is `doc(hidden)` since I don't know how to get the attrs on the import statement given a `ModChild`... I'll try to follow up with that, but this is a good first step.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jul 27, 2022
…gillot

Prefer visibility map parents that are not `doc(hidden)` first

Far simpler approach to rust-lang#98876.

This only fixes the case where the parent is `doc(hidden)`, not where the child is `doc(hidden)` since I don't know how to get the attrs on the import statement given a `ModChild`... I'll try to follow up with that, but this is a good first step.
@compiler-errors compiler-errors deleted the sort-visible-paths branch August 11, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants