about summary refs log tree commit diff
path: root/src/librustdoc/html/static/source-script.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-03-28 05:44:01 +0000
committerbors <bors@rust-lang.org>2019-03-28 05:44:01 +0000
commit6bfe4b7b51f47ca014d535506cbc5682f00d8d2a (patch)
tree28385771e29b4c966bd93f984b147ec2959d7e0f /src/librustdoc/html/static/source-script.js
parentd20e0002725d2b3efff23c97450806b3517ba804 (diff)
parent0c127e849487323a9f6be09d25c0da0aeb57314d (diff)
downloadrust-6bfe4b7b51f47ca014d535506cbc5682f00d8d2a.tar.gz
rust-6bfe4b7b51f47ca014d535506cbc5682f00d8d2a.zip
Auto merge of #59336 - gnzlbg:hint_black_box, r=alexcrichton
Moves test::black_box to core::hint and fix black_box on wasm32 and asm.js

This changes removes a cyclic dependency between the "test" and "libtest"
crates, where "libtest" depends on "test" for "black_box", but "test" depends on
"libtest" for everything else.

I've chosen the "hint" module because there seems to be enough consensus in the
discussion of RFC2360 that this module is where such an intrinsic would belong,
but this PR does not implement that RFC! If that RFC ever gets merged, the API, docs,
etc. of this API will need to change. This PR just move the implementation of the
already existing API.

For backwards compatibility reasons I've chosen to also keep the "test" feature
gate for these instead of adding a new feature gate. If we change the feature
gate, we'll potentially all benchmarks, and while that's something that we could
do, it seems unnecessary to do that now - if RFC2360 gets merged, we'll need to
do that anyways. Backwards compatibility is also why we continue to re-export
"black_box" from the "test" crate.

This PR also fixes black_box on the wasm32 target, which now supports inline assembly, and uses volatile loads on the asm.js target.

r? @Amanieu (cc @rust-lang/libs)
Diffstat (limited to 'src/librustdoc/html/static/source-script.js')
0 files changed, 0 insertions, 0 deletions