Remove many RefCells from DocContext#82305
Conversation
|
Waiting for CI to pass and then will do perf run. |
src/librustdoc/core.rs
Outdated
There was a problem hiding this comment.
I left this one in because it seems the lifetimes get tricky because it's moved around.
There was a problem hiding this comment.
Yeah, external_traits is a mess: https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Populating.20cache.20before.20intra-doc.20links
src/librustdoc/core.rs
Outdated
There was a problem hiding this comment.
I left this one in because
- It would require semi-significant changes
- Ideally we're going to get rid of
fake_def_idsat some point anyway (I think Joshua has an idea for that)
There was a problem hiding this comment.
Well, "at some point" is probably pretty far off. But I'm fine with waiting for a follow-up PR.
There was a problem hiding this comment.
Note to future readers: I was able to remove this one in #82382.
src/librustdoc/visit_lib.rs
Outdated
There was a problem hiding this comment.
Might I say, LibEmbargoVisitor is one of the most interesting names I've seen in rust-lang/rust.
|
I've been eagerly watching the logs and the rustdoc testsuite just passed! @bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
|
⌛ Trying commit ab1be029dc3b5d2c2efa94ad7e508172ab5617a0 with merge 42c967a8b9046d57e776497be0724b4e1b1931c7... |
|
☀️ Try build successful - checks-actions |
|
Queued 42c967a8b9046d57e776497be0724b4e1b1931c7 with parent 9b471a3, future comparison URL. |
|
Finished benchmarking try commit (42c967a8b9046d57e776497be0724b4e1b1931c7): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
|
Fairly small improvements, but they're in the right direction, and it cleans up the code. |
|
Hmm, seems I have conflicts but bors hasn't reported yet. |
af3e95d to
fb96100
Compare
|
Rebased. |
|
📌 Commit fb9610030cfd4596d3c1fc5074338d38b5b2661d has been approved by |
|
☔ The latest upstream changes (presumably #82393) made this pull request unmergeable. Please resolve the merge conflicts. |
I left some of them so this change doesn't balloon in size and because removing the RefCell in `DocContext.resolver` would require compiler changes. Thanks to `@jyn514` for making this a lot easier with rust-lang#82020!
fb96100 to
e4ac499
Compare
|
📌 Commit e4ac499 has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened. |
|
@bors rollup=iffy This only affects rustdoc's perf, not the compiler's. |
Rollup of 10 pull requests Successful merges: - rust-lang#81629 (Point out implicit deref coercions in borrow) - rust-lang#82113 (Improve non_fmt_panic lint.) - rust-lang#82258 (Implement -Z hir-stats for nested foreign items) - rust-lang#82296 (Support `pub` on `macro_rules`) - rust-lang#82297 (Consider auto derefs before warning about write only fields) - rust-lang#82305 (Remove many RefCells from DocContext) - rust-lang#82308 (Lower condition of `if` expression before it's "then" block) - rust-lang#82311 (Jsondocck improvements) - rust-lang#82362 (Fix mir-cfg dumps) - rust-lang#82391 (disable atomic_max/min tests in Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I left some of them so this change doesn't balloon in size and because
removing the RefCell in
DocContext.resolverwould require compilerchanges.
Thanks to @jyn514 for making this a lot easier with #82020!
r? @jyn514