Skip to content

Try out yeet in the MIR interpreter #98018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_const_eval/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]

Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_middle/src/mir/interpret/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#![feature(option_get_or_insert_default)]
#![feature(trusted_step)]
#![feature(try_blocks)]
#![feature(yeet_expr)]
#![recursion_limit = "256"]

#[macro_use]
Expand Down