I tried this code:
#![doc=include_str!("hi.txt")]
And built it with --emit=dep-info passed twice as a CLI arg.
gh-aDotInTheVoid@dev-desktop-eu-1:~/tmp/depinfo$ rustc +nightly ./demo.rs --emit=dep-info=rustc1.d --emit=dep-info=rustc2.d
gh-aDotInTheVoid@dev-desktop-eu-1:~/tmp/depinfo$ rustdoc +nightly ./demo.rs --emit=dep-info=rustdoc1.d --emit=dep-info=rustdoc2.d
I expected to see this happen: rustc and rustdoc agree how to handle --emit=dep-info=<path> multiple times.
Instead, this happened: rustc picks the 2nd one, but rustdoc picks the first one.
gh-aDotInTheVoid@dev-desktop-eu-1:~/tmp/depinfo$ rustc +nightly ./demo.rs --emit=dep-info=rustc1.d --emit=dep-info=rustc2.d
gh-aDotInTheVoid@dev-desktop-eu-1:~/tmp/depinfo$ rustdoc +nightly ./demo.rs --emit=dep-info=rustdoc1.d --emit=dep-info=rustdoc2.d -Zunstable-options
gh-aDotInTheVoid@dev-desktop-eu-1:~/tmp/depinfo$ ls
demo.rs doc hi.txt rustc2.d rustdoc1.d
Meta
$ rustc +nightly -vV
rustc 1.89.0-nightly (2805e1dc4 2025-05-26)
binary: rustc
commit-hash: 2805e1dc4c18ed4c84d161502c48da870c56f68a
commit-date: 2025-05-26
host: aarch64-unknown-linux-gnu
release: 1.89.0-nightly
LLVM version: 20.1.5
I tried this code:
#![doc=include_str!("hi.txt")]And built it with
--emit=dep-infopassed twice as a CLI arg.I expected to see this happen:
rustcandrustdocagree how to handle--emit=dep-info=<path>multiple times.Instead, this happened:
rustcpicks the 2nd one, butrustdocpicks the first one.Meta