...with an interesting twist. I actually didn't think the following would compile:
pub mod path {
pub use self::posix::Path_;
pub mod posix {
pub struct Path_;
impl Path_ { // (1)
pub fn one(&self) { println!("one"); }
}
}
}
pub mod io {
pub mod fs {
use path;
use path::Path_;
impl path::Path_ { // (2)
pub fn two(&self) { println!("two"); }
}
}
}
fn main() {
use path::Path_;
Path_.one();
Path_.two();
}
But it magically does! The twist here is that (2) used impl path::Path_ instead of impl Path_ (which would trigger a mysterious error message "found module name used as a type: impl io::fs::Path_::Path_", which is another story). Path::stat lives in (2) but rustdoc did merge its docs into (1)'s docs (with two sections). The link to (2)'s docs including Path::stat does not point the merged page, unfortunately.
This issue has worth a couple (or possibly three) of subtasks, but I wanted this issue to be described at least. Feel free to make related issues and reduce the scope of this issue.
...with an interesting twist. I actually didn't think the following would compile:
But it magically does! The twist here is that
(2)usedimpl path::Path_instead ofimpl Path_(which would trigger a mysterious error message "found module name used as a type: impl io::fs::Path_::Path_", which is another story).Path::statlives in(2)but rustdoc did merge its docs into(1)'s docs (with two sections). The link to(2)'s docs includingPath::statdoes not point the merged page, unfortunately.This issue has worth a couple (or possibly three) of subtasks, but I wanted this issue to be described at least. Feel free to make related issues and reduce the scope of this issue.