Can be reproduced with this code (each crate depend on the previous one):
baz.rs:
#![feature(rustc_attrs)]
#![allow(internal_features)]
#[rustc_has_incoherent_inherent_impls]
pub struct Error;
bar.rs:
#![feature(rustc_attrs)]
#![allow(internal_features)]
pub mod error {
pub use baz::Error;
}
impl baz::Error {
#[rustc_allow_incoherent_impl]
pub fn new() -> Self {
Self
}
}
lib.rs:
fn foo() {
let x = bar::error::Error::new();
}
When generating docs with --generate-link-to-definition, the link for the Error::new method points to ../../bar/struct.Error.html#method.new, but that's the path for baz::Error, not for bar::Error.
Can be reproduced with this code (each crate depend on the previous one):
baz.rs:bar.rs:lib.rs:When generating docs with
--generate-link-to-definition, the link for theError::newmethod points to../../bar/struct.Error.html#method.new, but that's the path forbaz::Error, not forbar::Error.