-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Handle remapped paths correctly when generating "Source" links #150172
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
base: main
Are you sure you want to change the base?
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
…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
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