If we have a workspace, let's say consisting of two crates: A
and A-derive
, then if in the A-derive
crate we have a documentation pointing to some type in the crate A
, we need to add a dependency:
[dependencies]
A = "../A"
And only then will we be able to hyperlink the types:
// A-derive lib.rs
/// See [A::function].
pub fn a_derive_function() {}
However, this causes cargo to break the building, saying there is a circular dependency between the crates. The A-derive
should be a separate crate as it is a procedural macro crate, and the A
crate is a normal crate. What are the ways to allow it to build and allow having such hyperlinks in the documentation?