]> git.lizzy.rs Git - rust.git/commit - src/tools/clippy
Rollup merge of #69959 - alexcrichton:fix-panic-in-print, r=Mark-Simulacrum
authorMazdak Farrokhzad <twingoow@gmail.com>
Thu, 19 Mar 2020 05:57:36 +0000 (06:57 +0100)
committerGitHub <noreply@github.com>
Thu, 19 Mar 2020 05:57:36 +0000 (06:57 +0100)
commit73c3a496cc8ce261e87abbd998b36ab16dab4f4b
tree92afedadaf106abf4705ade8129565cf9f22ced8
parent904909fd06cd203cea1651910962943b8338286c
parentd5b6a20557743911ff9f90af5d8ad24c699570d3
Rollup merge of #69959 - alexcrichton:fix-panic-in-print, r=Mark-Simulacrum

std: Don't abort process when printing panics in tests

This commit fixes an issue when using `set_print` and friends, notably
used by libtest, to avoid aborting the process if printing panics. This
previously panicked due to borrowing a mutable `RefCell` twice, and this
is worked around by borrowing these cells for less time, instead
taking out and removing contents temporarily.

Closes #69558