-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 cannot resolve specific trait impl functions #54172
Comments
There is always the absolute linking: Otherwise you got a good point here. |
Should this be fixed / working right now? I'm running nightly $ cat src/lib.rs
//! Check out the docs for [`SpecialFoo::foo`].
pub trait Foo {
/// This function generally does foo without side effects.
/// See [`SpecialFoo::foo`] for an example.
fn foo();
}
pub struct SpecialFoo {}
impl Foo for SpecialFoo {
/// This is a good example of doing [`Foo::foo`]
fn foo() {}
}
Using |
I believe this issue was incorrectly closed. The linked PR makes these links work inside of the trait impl block itself. But this issue is also about making those links work from outside of the trait impl block. @xliiv do you agree? |
I'm leaning toward this opinion. |
Confirmed, it's still unresolved. So the issue here is we have For consideration: |
This still appears this is unresolved, unless some alternate syntax was added to resolve it since June. It's a blocker for #78006, take a look at the Actions log for the errors |
The code in the original issue works without modification since #74489 (if you change it to have
Your issue in #78006 is related to primitives, please open a separate issue for that. |
I'm sorry, but you're incorrect. If you'd looked at the actions log I linked, you'd see the following errors.
Which to me seems to be related to this issue. There's more information on the PR comments here and here. I was going to create a new issue about this, but I figured that this one was what I was looking for, since the PR you linked wasn't linked and the last comment is saying it isn't fixed yet. Perhaps there's a corner case or this is caused by missing pubs. |
I don't see how this could be fixed, because at minimum you'd need a special syntax to resolve ambiguous matches. e.g. |
There's no way to have the link
SpecialFoo:foo()
resolve in the rustdoc, asSpecialFoo
does not contain this function. Unless there's a special syntax for referring toSpecialFoo
'sFoo
impl that would allow this.The text was updated successfully, but these errors were encountered: