We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd3ac03 commit b9e127aCopy full SHA for b9e127a
library/std/src/panicking.rs
@@ -215,10 +215,10 @@ pub fn take_hook() -> Box<dyn Fn(&PanicHookInfo<'_>) + 'static + Sync + Send> {
215
///
216
/// // Equivalent to
217
/// // let prev = panic::take_hook();
218
-/// // panic::set_hook(move |info| {
+/// // panic::set_hook(Box::new(move |info| {
219
/// // println!("...");
220
/// // prev(info);
221
-/// // );
+/// // }));
222
/// panic::update_hook(move |prev, info| {
223
/// println!("Print custom message and execute panic handler as usual");
224
/// prev(info);
0 commit comments