Skip to content
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 thinks Deref extends to functions that use Pin<&mut Self> #139458

Open
jnbooth opened this issue Apr 6, 2025 · 0 comments
Open

rustdoc thinks Deref extends to functions that use Pin<&mut Self> #139458

jnbooth opened this issue Apr 6, 2025 · 0 comments
Labels
A-associated-items Area: Associated items (types, constants & functions) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@jnbooth
Copy link

jnbooth commented Apr 6, 2025

If type A has a function with the self parameter Pin<&mut Self>, e.g. fn close(self: Pin<&mut Self>), and type B implements Deref<Target = A>, then those functions will be listed in type B's rustdoc in the "Methods from Deref<Target = A>" section. This is incorrect behavior because type B cannot access those functions through Deref.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Apr 6, 2025
@fmease fmease added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-associated-items Area: Associated items (types, constants & functions) C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items (types, constants & functions) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants