Skip to content

deduplicate pointer docs with include! #139190

@lolbinarycat

Description

@lolbinarycat
Contributor

A lot of the functions in const_ptr and mut_ptr are functionally the same with nearly identical documentation.

Currently, the docs are simply duplicated across both functions, but this can cause issues, such docs getting out of sync, or even functions having identical documentation despite having different safety invariants.

I think we should use the #[doc = include!("file.md")] pattern here, similar to what is done with the c ffi types.

Activity

added
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Mar 31, 2025
added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Mar 31, 2025
self-assigned this
on Apr 28, 2025
added
T-libsRelevant to the library team, which will review and decide on the PR/issue.
and removed
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Apr 30, 2025
added 2 commits that reference this issue on May 30, 2025
909eefd
ad884fa

12 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-technical-debtArea: Internal cleanup workT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @lolbinarycat@jieyouxu@rustbot

      Issue actions

        deduplicate pointer docs with include! · Issue #139190 · rust-lang/rust