rustdoc: Yet more intra-doc links cleanup#92635
Conversation
|
Some changes occurred in cc @camelid |
This includes commits from that PR, so it's blocked on it. |
This comment has been minimized.
This comment has been minimized.
e2bfb31 to
dbff2da
Compare
|
I have some meta comment. However, I'm only interested in what happens until the link path is resolved, but not in any of the following stuff, including rendering, etc. |
|
There actually isn't much intra-doc links code devoted to rendering; it's almost all resolution-related. I usually try to separate rendering cleanups from resolution cleanups anyway. Also, if a PR deals too much with rendering for you to review all of it, you could review just the resolution parts. Unless I'm misunderstanding what you mean by rendering? |
|
And thanks for offering to help with review load :) |
I mean these PRs work with things like e.g. "url fragments" and "anchors", which seem unrelated to path resolution. |
|
Actually, with my recent refactoring of fragments, they're very closely related to resolution. In most places in the intra-doc-links code, a I want to refactor the code so it uses full |
This hack was added in 6ab1f05. I don't know what change allowed removing the hack, but that commit added a test (which I presume covered the hack's behavior), and all tests are passing with this change. So, I think it should be good.
Inherent associated types *are* supported, just unstable.
This currently calls `std` a "crate" in one part of the message and a "module" in another part. The next commits fix this so it says "crate" in both places.
This allows simplifying a lot of code. It also fixes a subtle bug, exemplified by the test output changes.
Now that `res` is used directly, it seems the conditional is unnecessary.
I'm still not sure why this hack works so seemingly well.
These closures were quite complex and part of a quite complex function. The fact that they are closures makes mistakes likely when refactoring. For example, earlier, I meant to use `resolved`, an argument of the closure, but I instead typed `res`, which captured a local variable and caused a subtle bug that led to a confusing test failure. Extracting them as functions makes the code easier to understand and refactor.
|
r=me unless @Manishearth has more comments. |
|
gonna have a look later today probably |
|
@bors r+ |
|
📌 Commit 28d2353 has been approved by |
…arth rustdoc: Yet more intra-doc links cleanup r? `@Manishearth`
…arth rustdoc: Yet more intra-doc links cleanup r? ``@Manishearth``
…arth rustdoc: Yet more intra-doc links cleanup r? ```@Manishearth```
|
@bors r- |
|
@bors r=Manishearth |
|
📌 Commit 554c765 has been approved by |
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#92487 (Fix unclosed boxes in pretty printing of TraitAlias) - rust-lang#92581 (ARMv6K Horizon - Enable default libraries) - rust-lang#92619 (Add diagnostic items for macros) - rust-lang#92635 (rustdoc: Yet more intra-doc links cleanup) - rust-lang#92646 (feat: rustc_pass_by_value lint attribute) - rust-lang#92706 (Clarify explicitly that BTree{Map,Set} are ordered.) - rust-lang#92710 (Include Projections when elaborating TypeOutlives) - rust-lang#92746 (Parse `Ty?` as `Option<Ty>` and provide structured suggestion) - rust-lang#92792 (rustdoc: fix intra-link for generic trait impls) - rust-lang#92814 (remove unused FIXME) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @Manishearth