-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: Rustdoc lists associated consts from trait impls in sidebar #95459
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
Comments
This was intentionally added in #89815. |
@fmease The inclusion of associated consts from inherent impls is intentional. But is it intentional that associated consts from trait impls also appear in the sidebar (even though methods from trait impls do not)? (I'm filing this bug because for a crate I'm developing, the current behavior makes the sidebar extremely messy. Restricting the list of associated constants to those from inherent impls would make navigating the documentation for my crate much more pleasant.) |
I think the behavior @Jules-Bertholet proposes makes sense. |
…consts-from-trait-impls, r=jsha rustdoc: Only show associated consts from inherent impls in sidebar Resolves rust-lang#95459
…consts-from-trait-impls, r=jsha rustdoc: Only show associated consts from inherent impls in sidebar Resolves rust-lang#95459
I tried this code:
I expected to see this happen:
I would expect
BAR
not to appear as its own item in the rustdoc sidebar for theFoo
struct.This would be consistent with the behavior of methods and associated types from trait impls,
which also don't appear as their own item in the sidebar.
Instead, this happened:
The constant
BAR
is listed under "Associated Constants" in the left-hand sidebar of the rustdoc page forFoo
.This is inconsistent with how methods from trait impls appear in documentation.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: