Skip to content
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

A link to Path::stat method in the search is broken #12728

Closed
lifthrasiir opened this issue Mar 6, 2014 · 2 comments
Closed

A link to Path::stat method in the search is broken #12728

lifthrasiir opened this issue Mar 6, 2014 · 2 comments

Comments

@lifthrasiir
Copy link
Contributor

...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.

@huonw
Copy link
Member

huonw commented Mar 6, 2014

Dupe of #10284 (added a self contained example there).

@huonw huonw closed this as completed Mar 6, 2014
@huonw
Copy link
Member

huonw commented Mar 6, 2014

(And I opened #12729 about the mysterious error message, since none of the bugs with that message seem to cover exactly that case.)

flip1995 pushed a commit to flip1995/rust that referenced this issue May 2, 2024
Add myself back to review rotation

changelog: none
lnicola pushed a commit to lnicola/rust that referenced this issue Jun 23, 2024
fix: incorrect formatting of hover actions

fix rust-lang#12728.

### Changes

- Use ` | ` as the separator for actions. (I'm not sure why we use `___` previously)
- Reorder actions to match codelens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants