From ab43d8f201f661d35f1f2bb6d0c0444981d7f5a1 Mon Sep 17 00:00:00 2001 From: mrMiiao <90341146+mrMiiao@users.noreply.github.com> Date: Thu, 11 Aug 2022 16:57:41 +0300 Subject: [PATCH] Stable -> Nightly --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6928b53..fc2e8f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![feature(box_syntax, panic_info_message)] + use clap::Parser; use std::fs; use std::time::Instant; @@ -16,12 +18,12 @@ use interpreter::Interpreter; fn main() { std::panic::set_hook( - Box::new(|info| { + box |info| { eprint!("{msg}", msg = match info.message() { None => "Program panicked!".to_owned(), Some(x) => x.to_string() }); - }) + } ); let start = Instant::now();