Fix benchmarks in library/core with black_box#107598
Conversation
|
r? @thomcc (rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
library/core/benches/char/methods.rs
Outdated
There was a problem hiding this comment.
There is no need to put a black_box on the output, as it is automatically added by the Bencher interface: https://github.com/rust-lang/rust/blob/1.67.0/library/test/src/bench.rs#L117. The important part (for the output) is that the lambda function passed as argument to .iter() returns a non-() result (which is already the case here).
The black_box is definitely relevant for the input though :)
080e851 to
fe84cec
Compare
|
@rustbot ready |
|
Looks good. @bors r+ rollup |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#106575 (Suggest `move` in nested closure when appropriate) - rust-lang#106805 (Suggest `{var:?}` when finding `{?:var}` in inline format strings) - rust-lang#107500 (Add tests to assert current behavior of large future sizes) - rust-lang#107598 (Fix benchmarks in library/core with black_box) - rust-lang#107602 (Parse and recover from type ascription in patterns) - rust-lang#107608 (Use triple rather than arch for fuchsia test-runner) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #107590