-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Labels
A-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 toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Location
https://doc.rust-lang.org/stable/std/hint/fn.black_box.html
Summary
The documentation of black_box
states:
Programs cannot rely on black_box for correctness in any way.
but this is not accurate since programs can rely on it behaving like the identity function.
It would be better to reword this as
Programs cannot rely on black_box for correctness beyond it behaving as the identity function.
or similar, e.g.,
Programs cannot rely on the optimisation-inhibiting effects of black_box for correctness.
Metadata
Metadata
Assignees
Labels
A-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 toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.