-
Notifications
You must be signed in to change notification settings - Fork 13.5k
rustdoc: never link to unnamable items #143849
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
base: master
Are you sure you want to change the base?
rustdoc: never link to unnamable items #143849
Conversation
This comment has been minimized.
This comment has been minimized.
fb01811
to
950634d
Compare
rustbot has assigned @GuillaumeGomez. Use |
type Ty = Bar; | ||
} | ||
pub struct Bar; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to have this as a dependency for this test? Can't it be done within the current crate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, what happens if the const is named X
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bug only happens during cross-crate re-exports. Otherwise a separate failsafe kicks in.
I was under the impression that the _
was a delibraerately injected placeholder, but maybe it is just the constant name, if so we'll need a more principled approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, yeah, you're right, my assumptions were wrong. Just looking at the path isn't enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check what kind of item (block more precisely) the parent is. If it's not a module, then it's likely wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any idea what datastructure would retain that info in the cross-crate case? I'm somewhat struggling to understand how we even reconstruct path info and such from an rlib.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path doesn't matter here, you need to check what is its parent.
fixes #143222