diff --git a/src/lib.rs b/src/lib.rs index b529e7369002..c3f411f23063 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,4 @@ -#![feature( - rustc_private, - catch_expr, -)] +#![feature(rustc_private)] #![cfg_attr(feature = "cargo-clippy", allow(cast_lossless))] @@ -154,10 +151,10 @@ pub fn eval_main<'a, 'tcx: 'a>( ) { let mut ecx = create_ecx(tcx, main_id, start_wrapper).expect("Couldn't create ecx"); - let res: EvalResult = do catch { + let res: EvalResult = (|| { ecx.run()?; - ecx.run_tls_dtors()?; - }; + ecx.run_tls_dtors() + })(); match res { Ok(()) => { diff --git a/tests/compile-fail/stack_limit.rs b/tests/compile-fail/stack_limit.rs index c6aaf80e6ac0..5645217fe1ff 100644 --- a/tests/compile-fail/stack_limit.rs +++ b/tests/compile-fail/stack_limit.rs @@ -1,4 +1,4 @@ -#![feature(custom_attribute, attr_literals)] +#![feature(custom_attribute)] #![miri(stack_limit=16)] //error-pattern: reached the configured maximum number of stack frames