Closed
Description
I tried this code:
There are two crates, outer
and inner
. outer
depends on inner
.
outer/src/lib.rs:
use inner::SomeTrait;
pub struct SomeStruct;
impl SomeTrait for SomeStruct {
fn foo() {}
}
outer/inner/src/lib.rs:
/// this is a trait
pub trait SomeTrait {
/// this is a method for [SomeTrait]
fn foo();
}
pub mod bar {
use super::SomeTrait;
pub struct BarStruct;
impl SomeTrait for BarStruct {
fn foo() {}
}
}
I expected to see this happen: The trait implementation docs for SomeTrait::foo
on outer::SomeStruct
link to SomeTrait
.
Instead, this happened: The link is not resolved, and there is no warning or indication that it failed. Here is a screenshot of the generated docs:
Notably, the docs on inner::bar::BarStruct
resolve correctly despite being in a different module, indicating that this is a cross-crate issue.
Meta
rustc --version --verbose
:
rustc 1.44.1 (c7087fe00 2020-06-17)
binary: rustc
commit-hash: c7087fe00d2ba919df1d813c040a5d47e43b0fe7
commit-date: 2020-06-17
host: x86_64-unknown-linux-gnu
release: 1.44.1
LLVM version: 9.0