Skip to content

deduplicate pointer docs with include! #139190

Open
@lolbinarycat

Description

@lolbinarycat

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.

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

Issue actions