]> git.lizzy.rs Git - rust.git/commit
rollup merge of #20463: amaranth/black_box_output
authorAlex Crichton <alex@alexcrichton.com>
Thu, 15 Jan 2015 22:11:27 +0000 (14:11 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 15 Jan 2015 22:11:27 +0000 (14:11 -0800)
commitbaee2049eb551e06765d4f43b9ff61afd783aaf5
tree7f7af333aef8080d133769641c530a4485d84771
parent9ade482b3bdc7a967ca98f1f1138b596ef45191e
parent9f5fc563d3d592d5e44ab71759ffa26d326b3daa
rollup merge of #20463: amaranth/black_box_output

By returning the passed value black_box can be used on data being
passed to a function being benchmarked. This ensures the compiler
does not optimize the function for the input which could result in
the entire function being optimized away.
src/libcollections/str.rs