Skip to content

Use cargo's rustdoc-map instead to link to dependencies #1177

Description

@Nemo157

Currently we're generating --extern-html-root-url flags to pass to rustdoc ourselves:

for dep in &cargo_metadata.root_dependencies() {
rustdoc_flags.push("--extern-html-root-url".to_string());
rustdoc_flags.push(format!(
"{}=https://docs.rs/{}/{}",
dep.name.replace("-", "_"),
dep.name,
dep.version
));
}

This has issues (#1166, #1165).

Cargo has an unstable rustdoc-map feature rust-lang/cargo#8296 intended to allow users to do a similar thing easily via a simple url template. We can likely use this instead of doing it manually.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildsArea: Building the documentation for a crateC-enhancementCategory: This is a new feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions