diff options
| author | bors <bors@rust-lang.org> | 2022-06-12 20:44:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-12 20:44:58 +0000 |
| commit | 546c826f0ccaab36e897860205281f490db274e6 (patch) | |
| tree | 91962297a92526402d5e102b251cf99474051dda | |
| parent | 4153a2ec45f79b4ddf1968b163590f3d1130007f (diff) | |
| parent | a6c6fa0e33b362b7b6be5e9c68d1dc94a735af16 (diff) | |
| download | rust-546c826f0ccaab36e897860205281f490db274e6.tar.gz rust-546c826f0ccaab36e897860205281f490db274e6.zip | |
Auto merge of #98018 - scottmcm:miri-yeet, r=RalfJung
Try out `yeet` in the MIR interpreter Since we got a new bootstrap, we can give this a shot. r? `@oli-obk`
| -rw-r--r-- | compiler/rustc_const_eval/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/lib.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/mod.rs | 10 | ||||
| -rw-r--r-- | compiler/rustc_mir_transform/src/lib.rs | 1 |
4 files changed, 8 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/lib.rs b/compiler/rustc_const_eval/src/lib.rs index d2b5ef8ea6f..04410ca3828 100644 --- a/compiler/rustc_const_eval/src/lib.rs +++ b/compiler/rustc_const_eval/src/lib.rs @@ -20,6 +20,7 @@ Rust MIR: a lowered representation of Rust. #![feature(trusted_len)] #![feature(trusted_step)] #![feature(try_blocks)] +#![feature(yeet_expr)] #![recursion_limit = "256"] #![allow(rustc::potential_query_instability)] diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 8004319bf9b..46c34247d40 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -58,6 +58,7 @@ #![feature(decl_macro)] #![feature(drain_filter)] #![feature(intra_doc_pointers)] +#![feature(yeet_expr)] #![recursion_limit = "512"] #![allow(rustc::potential_query_instability)] diff --git a/compiler/rustc_middle/src/mir/interpret/mod.rs b/compiler/rustc_middle/src/mir/interpret/mod.rs index 214b919e24d..8733a85ef3f 100644 --- a/compiler/rustc_middle/src/mir/interpret/mod.rs +++ b/compiler/rustc_middle/src/mir/interpret/mod.rs @@ -56,7 +56,7 @@ macro_rules! err_machine_stop { // In the `throw_*` macros, avoid `return` to make them work with `try {}`. #[macro_export] macro_rules! throw_unsup { - ($($tt:tt)*) => { Err::<!, _>(err_unsup!($($tt)*))? }; + ($($tt:tt)*) => { do yeet err_unsup!($($tt)*) }; } #[macro_export] @@ -66,12 +66,12 @@ macro_rules! throw_unsup_format { #[macro_export] macro_rules! throw_inval { - ($($tt:tt)*) => { Err::<!, _>(err_inval!($($tt)*))? }; + ($($tt:tt)*) => { do yeet err_inval!($($tt)*) }; } #[macro_export] macro_rules! throw_ub { - ($($tt:tt)*) => { Err::<!, _>(err_ub!($($tt)*))? }; + ($($tt:tt)*) => { do yeet err_ub!($($tt)*) }; } #[macro_export] @@ -81,12 +81,12 @@ macro_rules! throw_ub_format { #[macro_export] macro_rules! throw_exhaust { - ($($tt:tt)*) => { Err::<!, _>(err_exhaust!($($tt)*))? }; + ($($tt:tt)*) => { do yeet err_exhaust!($($tt)*) }; } #[macro_export] macro_rules! throw_machine_stop { - ($($tt:tt)*) => { Err::<!, _>(err_machine_stop!($($tt)*))? }; + ($($tt:tt)*) => { do yeet err_machine_stop!($($tt)*) }; } mod allocation; diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs index 0e57c3c6979..0e52da57e60 100644 --- a/compiler/rustc_mir_transform/src/lib.rs +++ b/compiler/rustc_mir_transform/src/lib.rs @@ -9,6 +9,7 @@ #![feature(option_get_or_insert_default)] #![feature(trusted_step)] #![feature(try_blocks)] +#![feature(yeet_expr)] #![recursion_limit = "256"] #[macro_use] |
