4 #![feature(internal_output_capture)]
7 use std::fmt::{Display, Formatter};
8 use std::io::set_output_capture;
9 use std::sync::{Arc, Mutex};
14 fn fmt(&self, _f: &mut Formatter<'_>) -> fmt::Result {
20 set_output_capture(Some(Arc::new(Mutex::new(Vec::new()))));
21 assert!(std::panic::catch_unwind(|| {