Skip to content

404 for rustdoc [src] links for files with absolute paths #26995

Closed
@SimonSapin

Description

@SimonSapin

When the path to a source file as known to the compiler is absolute (which can happen with #[path = "/…"] mod foo; or include!), rustdoc fails to include the source of these files in its output.

For example, the [src] link on http://doc.servo.org/script/dom/bindings/codegen/Bindings/DOMParserBinding/enum.SupportedType.html goes to http://doc.servo.org/src/script///home/servo/buildbot/slave/doc/build/target/debug/build/script-49135cd7c70c0a0f/out/Bindings/DOMParserBinding.rs.html#99-102 which is a 404.

A simpler test case is hello.rs in http://doc.crates.io/build-script.html#case-study:-code-generation

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions