rustdoc: do not show self-by-value methods from Deref target if not Copy#33396
rustdoc: do not show self-by-value methods from Deref target if not Copy#33396birkenfeld wants to merge 1 commit into
Conversation
|
r? @cmr (rust_highfive has picked a reviewer for you, use r? to override) |
|
This seems sort of "extra special" to me in the sense that it's a bit of an odd condition to have in rustdoc. I'd personally be inclined to close the original issue as "not a bug", but curious what others think? |
|
I am torn. Showing that the method is there is what's accurate; if it can't be called for other reasons, well, it can't be called. Dunno. |
|
I somewhat agree, @alexcrichton. I think that if we were to have this sort of feature, we'd want to have some infrastructure in the compiler for determining which methods are reachable for a certain type, which would exclude such impossibilities, and render only those. The logic doesn't belong in rustdoc, but it's a "nice to have". |
|
@steveklabnik in some sense the information is still accurate, it's just saying that the methods on the deref'd type Additionally, this wouldn't work for types like |
That's a good point. I think I agree that this change is trying too hard. I'm fine with closing. |
|
Ok, I'm gonna close this for now, but thanks for the PR @birkenfeld! |
Fixes: #30607