Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Intra-doc link in core for a pointer method couldn't find Self #91204

Open
scottmcm opened this issue Nov 24, 2021 · 2 comments
Open

Intra-doc link in core for a pointer method couldn't find Self #91204

scottmcm opened this issue Nov 24, 2021 · 2 comments
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-raw-pointers Area: raw pointers, MaybeUninit, NonNull C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@scottmcm
Copy link
Member

I had my PR fail (web) (plain) when I tried to use intra-doc links to link to a pointer method.

error: unresolved link to `Self::from_bits`
  --> library/core/src/ptr/const_ptr.rs:54:33
   |
54 |     /// The inverse method is [`Self::from_bits`].
   |                                 ^^^^^^^^^^^^^^^ no item named `Self` in scope

Opening a bug as requested in
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Intra-doc.20links.20for.20pointers.3F/near/262639859

I particularly wanted intra-doc links here because there's #method.from_bits and #method.from_bits-1 on the page because of *const and *mut versions.

@scottmcm scottmcm added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Nov 24, 2021
@camelid camelid added C-bug Category: This is a bug. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-raw-pointers Area: raw pointers, MaybeUninit, NonNull labels Nov 24, 2021
@jyn514
Copy link
Member

jyn514 commented Nov 30, 2021

I particularly wanted intra-doc links here because there's #method.from_bits and #method.from_bits-1 on the page because of *const and *mut versions.

FWIW I'm pretty sure intra-docs won't help with this, it assumes there's only of function of that name per item 🙃

@jyn514
Copy link
Member

jyn514 commented Nov 30, 2021

See also #80896 and #85960

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-raw-pointers Area: raw pointers, MaybeUninit, NonNull 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