-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustdoc: convert if let Some()
that always matches to variable
#112251
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
src/librustdoc/visit_ast.rs
Outdated
@@ -290,27 +290,29 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> { | |||
|
|||
if !please_inline { | |||
let inherits_hidden = inherits_doc_hidden(tcx, res_did, None); | |||
let item_def_id = reexport_chain(tcx, def_id, res_did) |
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.
This changes things a bit: reexport_chain
and all the rest were only called if the item was private or was inheriting doc(hidden)
.
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 couldn't just use if let
, because the first item in a chain isn't allowed to be irrefutable.
Maybe I should factor this out into its own function instead?
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.
That would also allow to make it easier to understand what's going on so big 👍
37bf05c
to
a59e20b
Compare
Thanks! |
@bors r+ rollup |
📌 Commit a59e20b0215748e77db496b2b5ea88ca0b16d260 has been approved by It is now in the queue for this repository. |
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#112247 (rust-lld: add rpath entry to the correct `lib` folder) - rust-lang#112274 (Migrate GUI colors test to original CSS color format) - rust-lang#112277 (Don't require the output from libtest to be valid UTF-8) Failed merges: - rust-lang#112251 (rustdoc: convert `if let Some()` that always matches to variable) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 6 pull requests Successful merges: - rust-lang#112243 (Remove unneeded `Buffer` allocations when `&mut fmt::Write` can be used directly) - rust-lang#112263 (Remove ExtendElement, ExtendWith, extend_with) - rust-lang#112291 (Disable RustAnalyzer check by default, run Rustfmt check before) - rust-lang#112299 (Don't double-print status messages in GHA) - rust-lang#112311 (Ignore fluent message reordering in `git blame`) - rust-lang#112315 (fix spelling error) Failed merges: - rust-lang#112251 (rustdoc: convert `if let Some()` that always matches to variable) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#112081 (Avoid ICE on `#![doc(test(...)]` with literal parameter) - rust-lang#112196 (Resolve vars in result from `scrape_region_constraints`) - rust-lang#112303 (Normalize in infcx instead of globally for `Option::as_deref` suggestion) - rust-lang#112316 (Ensure space is inserted after keyword in `unused_delims`) - rust-lang#112318 (Merge method, type and const object safety checks) - rust-lang#112322 (Don't mention `IMPLIED_BOUNDS_ENTAILMENT` if signatures reference error) Failed merges: - rust-lang#112251 (rustdoc: convert `if let Some()` that always matches to variable) r? `@ghost` `@rustbot` modify labels: rollup
a59e20b
to
0f1aaef
Compare
Didn't I already approve it? 😆 |
You did. It got a merge conflict, so I rebased it, and needed to manually merge in the changes (specifically, |
Oh I see. Sorry I completely missed that. @bors r+ rollup |
Rollup of 6 pull requests Successful merges: - rust-lang#112076 (Fall back to bidirectional normalizes-to if no subst-relate candidate in alias-relate goal) - rust-lang#112122 (Add `-Ztrait-solver=next-coherence`) - rust-lang#112251 (rustdoc: convert `if let Some()` that always matches to variable) - rust-lang#112345 (fix(expand): prevent infinity loop in macro containing only "///") - rust-lang#112359 (Respect `RUST_BACKTRACE` for delayed bugs) - rust-lang#112382 (download-rustc: Fix `x test core` on MacOS) r? `@ghost` `@rustbot` modify labels: rollup
No description provided.