Skip to content

#[bench] attribute is stable and test crate can be replaced #38998

@brson

Description

@brson

Per @SimonSapin's comment. It is possible to swap out the test crate via cargo and get the #[bench] functionality on stable.

This has been abused in the wild for a long time, and is a fairly major blunder. Swapping out the test crate exposes a large swath of ad-hoc test API's to the stable ecosystem (rustc generates calls to these APIs).

Fixing this will require providing a plausible alternative and a long deprecation and migration period.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-libtestArea: `#[test]` / the `test` libraryC-bugCategory: This is a bug.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

    No branches or pull requests

    Issue actions