-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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: Methods from Deref<Target = T<U>>
is imprecise (contains false positives)
#24686
Comments
Just wondering (to help prioritize this), is there an example of this bug in the standard library docs? |
I don't think there's anything which matches this particular example exactly. The closest thing that I could find was http://doc.rust-lang.org/nightly/collections/vec/struct.DerefVec.html |
Ah yeah. Preserving bounds in the deref is related but distinct enough it would be worth creating a new issue for it. As an aside: when I tried to do the "methods available through Deref" feature myself, a couple months ago, I got stuck enumerating all of these miscellaneous issues and pondering pie in the sky solutions for them. I'm so happy acrichto stepped in to ship something covering the 95% use case :-) — On Thu, Apr 23, 2015 at 12:09 PM, whataloadofwhat
|
I hit this trying to make a unified I'll probably work around it by dropping the generic |
Fixing this likely involves figuring out how to filter the impls somewhere around here. That |
U
boundMethods from Deref<Target=T<U>>
is imprecise (contains false positives)
Methods from Deref<Target=T<U>>
is imprecise (contains false positives)Methods from Deref<Target = T<U>>
is imprecise (contains false positives)
Did some more looking into this, and I think the issue is here, where we are throwing away the generic arguments of the rust/src/librustdoc/html/render/mod.rs Line 1417 in 617aad8
Unfortunately, I can't find the other half, the generic arguments of the impl block that the methods are from, so I can't fix this, but I'll be adding a |
This seems to have regressed somewhat recently, as now the two impl blocks are merged into one! |
Is "methods from deref" a field in rustdoc-json output? if it is, and it has the same bug, this likely needs to be fixed somewhere outside of |
Figured it out, the key function is |
Hmm.. it seems the sidebar is generated separately... |
The
Methods from Deref
forBar
will contain bothget_i32
andget_u32
, but should only containget_i32
.Image
The text was updated successfully, but these errors were encountered: