Open
Description
Bug? Inconvenience? Who knows, but it confused me greatly.
Problem
I ran cargo build --lib -- -Z self-profile
from src/librustdoc
in a clone of https://github.com/rust-lang/rust/. I expected the output file to be in src/librustdoc/rustdoc-24097.mm_profdata
, since that's where it would be if I ran rustc directly. Instead they showed up in the workspace root: rustdoc-24097.mm_profdata
.
Steps
- git clone https://github.com/rust-lang/rust/
- cd rust/src/librustdoc
- git checkout 500b0f3c1ba651f31abc551ccbcf222f48e355a2
- cargo build --lib -- -Z self-profile
(but I think this is true in any workspace)
Possible Solution(s)
Run rustc from the src/librustdoc
folder instead, which will put the file in the expected place.
Notes
Output of cargo version
: cargo 1.50.0-nightly (bfca1cd 2020-11-24)
I don't think this is a bug per-se, but it would be nice to document, maybe.