You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setup a pair of crates, the first a proc-macro linking to a dependency and the second re-exporting from the first:
> cargo new --lib foo Created library `foo` package
> cat <<END >> foo/Cargo.tomlbs58.version = "0.3"[lib]proc-macro = trueEND
> cat <<'END' > foo/src/lib.rs/// [`bs58::Alphabet`]#[proc_macro]pub fn foo(t: proc_macro::TokenStream) -> proc_macro::TokenStream { t }END
> cargo new --lib bar Created library `bar` package
> echo'foo.path = "../foo"'>> bar/Cargo.toml
> echo'pub use foo::foo;'>> bar/src/lib.rs
Now build the docs for the second crate, using -Zrustdoc-map to link dependencies to docs.rs:
> cd bar && cargo rustdoc -Z rustdoc-map --config "doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" Compiling bs58 v0.3.1 Compiling foo v0.1.0 (/tmp/tmp.VUf54czzNC/foo) Documenting bar v0.1.0 (/tmp/tmp.VUf54czzNC/bar) Finished dev [unoptimized + debuginfo] target(s) in 0.74s
Expected: Open the docs and the re-exported bar::foo has a resolved link to bs58::Alphabet.
Actual: The link is missing
Prior to #94857 it was possible to hack this into working by adding bs58 as a dependency of bar too, but since that change that no longer works for proc-macro intermediary crates; it still works for non-proc-macros as I assume the crate ids get unified somehow.
The text was updated successfully, but these errors were encountered:
Nemo157
added
C-bug
Category: This is a bug.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
labels
Apr 11, 2023
Setup a pair of crates, the first a proc-macro linking to a dependency and the second re-exporting from the first:
Now build the docs for the second crate, using
-Zrustdoc-map
to link dependencies to docs.rs:Expected: Open the docs and the re-exported
bar::foo
has a resolved link tobs58::Alphabet
.Actual: The link is missing
Prior to #94857 it was possible to hack this into working by adding
bs58
as a dependency ofbar
too, but since that change that no longer works for proc-macro intermediary crates; it still works for non-proc-macros as I assume the crate ids get unified somehow.The text was updated successfully, but these errors were encountered: