-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Hi,
From https://github.com/rust-lang/rust/blob/master/library/core/src/alloc/global.rs#L5 this mentions how to use a different global allocator in the main of a binary. It would be beneficial to be able to use the same allocator in tests of that binary, or associated libraries and modules.
Can this documentation be extended to demonstrate how cargo test can use an alternate allocator? Alternately if this isn't possible today, can this be a feature request to allow the allocator to be changed with cargo test?
Thanks,
Metadata
Metadata
Assignees
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-libtestArea: `#[test]` / the `test` libraryArea: `#[test]` / the `test` libraryC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Projects
Status
No status