-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Intra-doc links do not resolve associated items for blanket impls #78800
Comments
Note that rustc resolves it fine if you call |
Another related issue for after this is fixed: right now rustdoc doesn't consider scoping at all for blanket impls, only for direct impls like
|
If we change cx.enter_resolver(|resolver| {
resolver.traits_in_scope(module).iter().find(|candidate| candidate.def_id == trait_).is_some()
}) which is not as efficient as only looking up the relevant traits in the first place but I think is the best we can do while still being able to reuse the code for |
Currently looking into fixing this, |
…h,GuillaumeGomez Don't look for blanket impls in intra-doc links This never worked and has been causing severe performance problems. Hopefully it will be re-landed at some point in the future when it actually works, but in the meantime it makes no sense to have the code around when it does nothing and actively makes rustdoc harder to use. Closes rust-lang#78761. Does *not* affect rust-lang#78800. r? `@Manishearth` cc `@seeplusplus`
Update intra-doc link documentation to match the implementation r? `@Manishearth` cc `@camelid` `@m-ou-se` Relevant PRs: - rust-lang#74489 - rust-lang#80181 - rust-lang#76078 - rust-lang#77519 - rust-lang#73101 Relevant issues: - rust-lang#78800 - rust-lang#77200 - rust-lang#77199 / rust-lang#54191 I haven't documented things that I consider 'just bugs', like rust-lang#77732, but I have documented features that aren't implemented, like rust-lang#78800.
@seeplusplus hi, are you still working on this? It's ok if not, but please comment |
@rustbot release-assignment |
I tried this code:
I expected to see this happen: The link resolves to
<S as Trait>::f
Instead, this happened: rustdoc can't resolve the link:
Meta
rustdoc +nightly --version
:rustdoc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
cc @seeplusplus
After seeing #78761 I'm strongly considering getting rid of blanket impls altogether, clearly no one has been using them or they would have opened an issue. @Manishearth what do you think?
The text was updated successfully, but these errors were encountered: