Skip to content

[docs] core::global_allocator should link to std::alloc::GlobalAlloc #77100

Closed
@yoshuawuyts

Description

@yoshuawuyts
Member

Seaching for global_allocator in the docs only surfaces core::global_allocator. This surfaces no information on how to use it, since all that info is part of std::alloc::GlobalAlloc.

The solution seems to link from global_allocator to GlobalAlloc so people can read more. However I'm not sure how to create a link between these since they live in separate crates. What's the right way to go about this?

edit: if someone wants to pick this up, please do. This is probably a "good first issue" once we figure out how to link between the two.

Screenshots

Screenshot_2020-09-23 core global_allocator - Rust

References

Activity

changed the title [-][docs] core::global_allocator should link to std::alloc::GlobalAlloc[/-] [+][docs] `core::global_allocator` should link to `std::alloc::GlobalAlloc`[/+] on Sep 23, 2020
jyn514

jyn514 commented on Sep 23, 2020

@jyn514
Member

The solution seems to link from global_allocator to GlobalAlloc so people can read more. However I'm not sure how to create a link between these since they live in separate crates. What's the right way to go about this?

These can't use intra-doc links, so you need to use relative links. I think ../std/alloc/trait.GlobalAlloc.html would work.

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.
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
on Sep 23, 2020
jyn514

jyn514 commented on Sep 23, 2020

@jyn514
Member

Mentoring instructions: At

/// Attribute macro applied to a static to register it as a global allocator.

add a link to ../std/alloc/trait.GlobalAlloc.html.

added
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
on Sep 23, 2020
mightyiam

mightyiam commented on Sep 24, 2020

@mightyiam
Contributor

Could I take this on as my first issue?

yoshuawuyts

yoshuawuyts commented on Sep 24, 2020

@yoshuawuyts
MemberAuthor

@mightyiam please do!

LeSeulArtichaut

LeSeulArtichaut commented on Sep 25, 2020

@LeSeulArtichaut
Contributor

Feel free to use the @rustbot claim command to assign the issue to yourself and show you're working on it

mightyiam

mightyiam commented on Sep 26, 2020

@mightyiam
Contributor

@rustbot claim

added a commit that references this issue on Oct 5, 2020

Rollup merge of rust-lang#77219 - mightyiam:issue_77100, r=jyn514

583269d
yoshuawuyts

yoshuawuyts commented on Oct 6, 2020

@yoshuawuyts
MemberAuthor

yay; thanks for landing this @mightyiam!

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 toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @mightyiam@yoshuawuyts@jyn514@LeSeulArtichaut

    Issue actions

      [docs] `core::global_allocator` should link to `std::alloc::GlobalAlloc` · Issue #77100 · rust-lang/rust