rust icon indicating copy to clipboard operation
rust copied to clipboard

rustdoc: Simplify modifications of effective visibility table

Open petrochenkov opened this issue 3 years ago • 3 comments

It is now obvious that rustdoc only calls set_access_level with foreign def ids and AccessLevel::Public.

cc https://github.com/rust-lang/rust/pull/102026 @Bryanskiy

petrochenkov avatar Oct 13 '22 14:10 petrochenkov

r? @CraftSpider

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

rust-highfive avatar Oct 13 '22 14:10 rust-highfive

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Rustbook (x86_64-unknown-linux-gnu) - edition-guide
Rustbook (x86_64-unknown-linux-gnu) - style-guide
Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
    Finished release [optimized] target(s) in 0.21s
std/iter/trait.Iterator.html:2155: broken link - `alloc/collections/vec_deque/pair_slices/struct.PairSlices.html`
std/primitive.pointer.html:1804: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.pointer.html:1804: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.pointer.html:1804: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.pointer.html:1804: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
std/primitive.slice.html:2316: broken link - `alloc/collections/vec_deque/ring_slices/trait.RingSlices.html`
number of HTML files scanned: 33006
number of HTML redirects found: 10117
number of links checked: 2474786
number of links ignored due to external: 118370

rust-log-analyzer avatar Oct 13 '22 15:10 rust-log-analyzer

:umbrella: The latest upstream changes (presumably #102026) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Oct 16 '22 23:10 bors

I made one more step and separated effective visibilities ("access levels") coming from rustc from similar data collected by rustdoc for extern DefIds. The original table is no longer modified and now only contains local def ids as populated by rustc.

petrochenkov avatar Oct 19 '22 20:10 petrochenkov

:umbrella: The latest upstream changes (presumably #103431) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Oct 23 '22 14:10 bors

Ping @CraftSpider @GuillaumeGomez This PR is a pre-requisite for other work, including https://github.com/rust-lang/rust/pull/94857.

petrochenkov avatar Oct 29 '22 11:10 petrochenkov

Looks good to me, thanks! Let's run a perf check to ensure it doesn't have an impact then let's r+.

@bors try @rust-timer queue

GuillaumeGomez avatar Oct 29 '22 12:10 GuillaumeGomez

Awaiting bors try build completion.

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

rust-timer avatar Oct 29 '22 12:10 rust-timer

:hourglass: Trying commit a5ea013436b3f11d263e1c5e3dc2383de2bc68c6 with merge 5e44172c9c9d88b400c5755c5caf906c9b8188f6...

bors avatar Oct 29 '22 12:10 bors

:sunny: Try build successful - checks-actions Build commit: 5e44172c9c9d88b400c5755c5caf906c9b8188f6 (5e44172c9c9d88b400c5755c5caf906c9b8188f6)

bors avatar Oct 29 '22 14:10 bors

Queued 5e44172c9c9d88b400c5755c5caf906c9b8188f6 with parent 33b530e04099465a8029ef581202d52f4075558e, future comparison URL.

rust-timer avatar Oct 29 '22 14:10 rust-timer

Finished benchmarking commit (5e44172c9c9d88b400c5755c5caf906c9b8188f6): comparison URL.

Overall result: ✅ improvements - no action needed

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.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.1%, -0.3%] 21
Improvements ✅
(secondary)
-1.0% [-1.3%, -0.3%] 19
All ❌✅ (primary) -0.5% [-1.1%, 0.3%] 22

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
-3.4% [-3.4%, -3.4%] 1
Improvements ✅
(secondary)
-3.3% [-3.7%, -3.0%] 2
All ❌✅ (primary) -3.4% [-3.4%, -3.4%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

rust-timer avatar Oct 29 '22 15:10 rust-timer

Even if small, it does impact (positively) performance, nice!

@bors r+ rollup=iffy

GuillaumeGomez avatar Oct 29 '22 15:10 GuillaumeGomez

:pushpin: Commit a5ea013436b3f11d263e1c5e3dc2383de2bc68c6 has been approved by GuillaumeGomez

It is now in the queue for this repository.

bors avatar Oct 29 '22 15:10 bors

:umbrella: The latest upstream changes (presumably #103727) made this pull request unmergeable. Please resolve the merge conflicts.

bors avatar Oct 29 '22 17:10 bors

@bors r=GuillaumeGomez

petrochenkov avatar Oct 29 '22 20:10 petrochenkov

:pushpin: Commit f1850d4c9b5f4f64ad41193bb8c846027754f0ca has been approved by GuillaumeGomez

It is now in the queue for this repository.

bors avatar Oct 29 '22 20:10 bors

:hourglass: Testing commit f1850d4c9b5f4f64ad41193bb8c846027754f0ca with merge fab0432952b24df769459d4c973dbb8d08561a83...

bors avatar Oct 30 '22 10:10 bors

:sunny: Test successful - checks-actions Approved by: GuillaumeGomez Pushing fab0432952b24df769459d4c973dbb8d08561a83 to master...

bors avatar Oct 30 '22 13:10 bors

Finished benchmarking commit (fab0432952b24df769459d4c973dbb8d08561a83): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.1% [1.1%, 1.1%] 1
Improvements ✅
(primary)
-0.6% [-1.3%, -0.3%] 21
Improvements ✅
(secondary)
-1.1% [-1.5%, -0.3%] 21
All ❌✅ (primary) -0.6% [-1.3%, -0.3%] 21

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
-3.6% [-3.6%, -3.6%] 1
Improvements ✅
(secondary)
-3.4% [-3.8%, -3.2%] 3
All ❌✅ (primary) -3.6% [-3.6%, -3.6%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.2%, -2.2%] 3
All ❌✅ (primary) - - 0

rust-timer avatar Oct 30 '22 14:10 rust-timer