New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc intra links: doc of exported private items don't have the namespace of their doc-visible location #55365

Closed
crumblingstatue opened this Issue Oct 25, 2018 · 2 comments

Comments

Projects
None yet
5 participants
@crumblingstatue
Contributor

crumblingstatue commented Oct 25, 2018

mod window {
    /// See [Event]
    pub struct Window;
}
mod event {
    /// See [Window]
    pub struct Event;
}

pub use event::Event;
pub use window::Window;
6 |     /// See [Window]
  |              ^^^^^^ cannot be resolved, ignoring

I don't know if this is an accidental regression or intentional, but this used to resolve.

It has been used extensively by rust-sfml. See the example of Event referring to Window. From the viewpoint of the user, Event and Window exist in the same module. It's only a private implementation detail that they are implemented in their own submodules, and re-exported into a common module.

Ref #43466

@Nemo157

This comment has been minimized.

Contributor

Nemo157 commented Oct 26, 2018

IMO this seems like spooky action at a distance, I would expect doc links to always resolve from the place where they are written. Otherwise you have issues if the same documentation is expected to be shown at multiple places with different locally visible paths (presumably this changed to fix this exact case, it is an issue that has been hit many times in the futures(0.3) ecosystem).

@Manishearth

This comment has been minimized.

Member

Manishearth commented Nov 27, 2018

reexports are expected to be broken with intra doc links

see #43466 , this is why we haven't been able to stabilize it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment