-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
librustdoc: more usages of Joined::joined
#136599
Conversation
.filter_map(|s| if !s.is_empty() { Some(s.as_str()) } else { None }) | ||
.collect::<Vec<_>>() | ||
.join(" "), | ||
title = format_args!("{} {}", myitem.type_(), full_path(cx, myitem)), |
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.
looked a little deeper at this and turned out neither myitem.type_()
or full_path(...)
can ever be empty, so the whole joined-array thing is unneeded
.iter() | ||
.map(|seg| { | ||
fmt::from_fn(|f| { | ||
if seg.ident.name != kw::PathRoot { |
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.
The logic here is weird (pre-existing).
The kw::PathRoot
should only ever be the first segment, I think. And we wouldn't want to join two "::"s together anyways.
Wow, you're on fire. :D Let's check perf results then! @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
…<try> librustdoc: more usages of `Joined::joined` Some missed opportunities from rust-lang#136244 r? `@GuillaumeGomez` since you reviewed the last one (feel free to re-assign, of course 😊) First two commits are just drive-by cleanups
☀️ Try build successful - checks-actions |
@GuillaumeGomez I think the perf bot didn't work? |
Ah indeed. Let's try again. @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Still not apparently. Fun times. @rust-timer build 2ffed9b |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (2ffed9b): comparison URL. Overall result: no relevant changes - no action neededBenchmarking 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 Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -0.2%, secondary 2.1%)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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 778.801s -> 776.752s (-0.26%) |
2341962
to
4457ce5
Compare
☔ The latest upstream changes (presumably #136828) made this pull request unmergeable. Please resolve the merge conflicts. |
4457ce5
to
91df3fa
Compare
_ => unreachable!(), | ||
} | ||
} | ||
write_str( |
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 find this code much less good compared to the current one.
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 agree. I'll try to re-write and if I can't make it nicer I'll just revert this part.
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.
Reverted this part for now. (in a separate commit, will rebase if this PR is approved)
91df3fa
to
12abbb2
Compare
Ping me once squashed. :) |
12abbb2
to
c0b1c6e
Compare
@GuillaumeGomez ping :) |
Thanks! @bors r+ rollup |
…r=GuillaumeGomez librustdoc: more usages of `Joined::joined` Some missed opportunities from rust-lang#136244 r? `@GuillaumeGomez` since you reviewed the last one (feel free to re-assign, of course 😊) First two commits are just drive-by cleanups
…llaumeGomez Rollup of 11 pull requests Successful merges: - rust-lang#127793 (Added project-specific Zed IDE settings) - rust-lang#134995 (Stabilize const_slice_flatten) - rust-lang#135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies) - rust-lang#136599 (librustdoc: more usages of `Joined::joined`) - rust-lang#136750 (Make ub_check message clear that it's not an assert) - rust-lang#137000 (Deeply normalize item bounds in new solver) - rust-lang#137126 (fix docs for inherent str constructors) - rust-lang#137151 (Install more signal stack trace handlers) - rust-lang#137161 (Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions) - rust-lang#137167 (tests: Also gate `f16::erfc()` doctest with `reliable_f16_math` cfg) - rust-lang#137177 (Update `minifier-rs` version to `0.3.5`) r? `@ghost` `@rustbot` modify labels: rollup
…r=GuillaumeGomez librustdoc: more usages of `Joined::joined` Some missed opportunities from rust-lang#136244 r? ``@GuillaumeGomez`` since you reviewed the last one (feel free to re-assign, of course 😊) First two commits are just drive-by cleanups
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#135711 (Do not ICE on default_field_value const with lifetimes) - rust-lang#136599 (librustdoc: more usages of `Joined::joined`) - rust-lang#136876 (Locking documentation updates) - rust-lang#137000 (Deeply normalize item bounds in new solver) - rust-lang#137126 (fix docs for inherent str constructors) - rust-lang#137161 (Pattern Migration 2024: fix incorrect messages/suggestions when errors arise in macro expansions) - rust-lang#137191 (Update mdbook and move error_index_generator) - rust-lang#137203 (Improve MIR modification) - rust-lang#137206 (Make E0599 a structured error) - rust-lang#137218 (misc `layout_of` cleanup) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136599 - yotamofek:pr/rustdoc-more-joined, r=GuillaumeGomez librustdoc: more usages of `Joined::joined` Some missed opportunities from rust-lang#136244 r? ```@GuillaumeGomez``` since you reviewed the last one (feel free to re-assign, of course 😊) First two commits are just drive-by cleanups
Some missed opportunities from #136244
r? @GuillaumeGomez since you reviewed the last one (feel free to re-assign, of course 😊)
First two commits are just drive-by cleanups