Handle remapped paths correctly when generating "Source" links#150172
Handle remapped paths correctly when generating "Source" links#150172bors merged 3 commits intorust-lang:mainfrom
Conversation
|
This comment has been minimized.
This comment has been minimized.
Nevermind, the fix was incomplete. It works fine now. Details |
dfdb113 to
811c241
Compare
|
@Urgau told me they would be able to update the PR until tomorrow and told me to push if I wanted it to be merged sooner. So considering it's a big regression, I pushed a commit (to not appear as co-author of a previous one considering it's such a small change...). Will need to nominate it for beta-backport once merged as well. In any case. @bors r+ rollup |
…aumeGomez Handle remapped paths correctly when generating "Source" links Fixes rust-lang#150100. This PR fixes a regression introduced by [rust-lang#149709](rust-lang#149709), I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of `rustdoc` in the presence of remapped, to simply reject them instead of handling them. With this PR remapped paths are handled correctly, in a similar way as it was before. ~~I added a run-make test to make sure we don't regress it again, a simple `rustdoc` test in not sufficient as `rustdoc` is not called on the auxiliary crate. It's not pretty but it works.~~ rust-lang#150172 (comment) rustdoc doesn't have any handling for `--remap-path-scope`, so I used the `MACRO` scope (it was already used [elsewhere](https://github.com/rust-lang/rust/blob/b889870082dd0b0e3594bbfbebb4545d54710829/src/librustdoc/clean/types.rs#L154). cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
…aumeGomez Handle remapped paths correctly when generating "Source" links Fixes rust-lang#150100. This PR fixes a regression introduced by [rust-lang#149709](rust-lang#149709), I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of `rustdoc` in the presence of remapped, to simply reject them instead of handling them. With this PR remapped paths are handled correctly, in a similar way as it was before. ~~I added a run-make test to make sure we don't regress it again, a simple `rustdoc` test in not sufficient as `rustdoc` is not called on the auxiliary crate. It's not pretty but it works.~~ rust-lang#150172 (comment) rustdoc doesn't have any handling for `--remap-path-scope`, so I used the `MACRO` scope (it was already used [elsewhere](https://github.com/rust-lang/rust/blob/b889870082dd0b0e3594bbfbebb4545d54710829/src/librustdoc/clean/types.rs#L154). cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
Rollup of 4 pull requests Successful merges: - #146747 (rustc_codegen_llvm: Tidying of `update_target_reliable_float_cfg`) - #148499 (Nvptx: Use llbc as default linker) - #148991 (miri genmc: fix exit() handling) - #150172 (Handle remapped paths correctly when generating "Source" links) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #150172 - Urgau:rustdoc-remap-fixes, r=GuillaumeGomez Handle remapped paths correctly when generating "Source" links Fixes #150100. This PR fixes a regression introduced by [#149709](#149709), I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of `rustdoc` in the presence of remapped, to simply reject them instead of handling them. With this PR remapped paths are handled correctly, in a similar way as it was before. ~~I added a run-make test to make sure we don't regress it again, a simple `rustdoc` test in not sufficient as `rustdoc` is not called on the auxiliary crate. It's not pretty but it works.~~ #150172 (comment) rustdoc doesn't have any handling for `--remap-path-scope`, so I used the `MACRO` scope (it was already used [elsewhere](https://github.com/rust-lang/rust/blob/b889870082dd0b0e3594bbfbebb4545d54710829/src/librustdoc/clean/types.rs#L154). cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
Handle remapped paths correctly when generating "Source" links Fixes rust-lang/rust#150100. This PR fixes a regression introduced by [#149709](rust-lang/rust#149709), I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of `rustdoc` in the presence of remapped, to simply reject them instead of handling them. With this PR remapped paths are handled correctly, in a similar way as it was before. ~~I added a run-make test to make sure we don't regress it again, a simple `rustdoc` test in not sufficient as `rustdoc` is not called on the auxiliary crate. It's not pretty but it works.~~ rust-lang/rust#150172 (comment) rustdoc doesn't have any handling for `--remap-path-scope`, so I used the `MACRO` scope (it was already used [elsewhere](https://github.com/rust-lang/rust/blob/b889870082dd0b0e3594bbfbebb4545d54710829/src/librustdoc/clean/types.rs#L154). cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
Rollup of 4 pull requests Successful merges: - rust-lang/rust#146747 (rustc_codegen_llvm: Tidying of `update_target_reliable_float_cfg`) - rust-lang/rust#148499 (Nvptx: Use llbc as default linker) - rust-lang/rust#148991 (miri genmc: fix exit() handling) - rust-lang/rust#150172 (Handle remapped paths correctly when generating "Source" links) r? `@ghost` `@rustbot` modify labels: rollup
Fixes #150100.
This PR fixes a regression introduced by #149709, I was overzealous in my changes (https://github.com/rust-lang/rust/pull/149709/changes#diff-e1cf7ef2fb411d24980cd4cbea1e867cc36029e9496e1ceca64cfb6a0e3510f6) and accidentally changed the behavior of
rustdocin the presence of remapped, to simply reject them instead of handling them.With this PR remapped paths are handled correctly, in a similar way as it was before.
I added a run-make test to make sure we don't regress it again, a simple#150172 (comment)rustdoctest in not sufficient asrustdocis not called on the auxiliary crate. It's not pretty but it works.rustdoc doesn't have any handling for
--remap-path-scope, so I used theMACROscope (it was already used elsewhere.cf. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/source.20links.20missing.20for.20nightly.20std.20docs
r? @GuillaumeGomez