Skip to content

Regression in pwd of cargo doc #47434

@dtolnay

Description

@dtolnay

For one of my projects I build and publish docs of the master branch from CI. I use the command RUSTDOC=./rustdoc cargo doc with a script that looks like:

#!/bin/sh

exec rustdoc "$@" --html-after-content script.js

This works as of stable rustc 1.23.0. But with rustc 1.24.0-beta.3 it no longer works because the RUSTDOC is resolved relative to /path/to/registry/src/github.com-$hash/$crate-$version instead of relative to the directory from which I ran cargo doc. This is different from how RUSTC=./foo cargo build is resolved so I believe it is a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-highHigh priorityT-cargoRelevant to the cargo team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions