Auto merge of #5687 - ehuss:beta-panic-rustdoc, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 5 Jul 2018 21:59:33 +0000 (21:59 +0000)
committerbors <bors@rust-lang.org>
Thu, 5 Jul 2018 21:59:33 +0000 (21:59 +0000)
[BETA] Fix doctests linking too many libs.

Backport of #5651.


Trivial merge