Rollup merge of #121598 - RalfJung:catch_unwind, r=oli-obk
rename 'try' intrinsic to 'catch_unwind' The intrinsic has nothing to do with `try` blocks, and corresponds to the stable `catch_unwind` function, so this makes a lot more sense IMO. Also rename Miri's special function while we are at it, to reflect the level of abstraction it works on: it's an unwinding mechanism, on which Rust implements panics.
This commit is contained in:
commit
acb6f1afdd
@ -23,7 +23,7 @@ macro_rules! intrinsic_args {
|
||||
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
|
||||
use rustc_middle::ty::GenericArgsRef;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym, Symbol};
|
||||
use rustc_span::symbol::{sym, Symbol};
|
||||
|
||||
pub(crate) use self::llvm::codegen_llvm_intrinsic_call;
|
||||
use crate::prelude::*;
|
||||
@ -1132,7 +1132,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
||||
ret.write_cvalue(fx, val);
|
||||
}
|
||||
|
||||
kw::Try => {
|
||||
sym::catch_unwind => {
|
||||
intrinsic_args!(fx, args => (f, data, catch_fn); intrinsic);
|
||||
let f = f.load_scalar(fx);
|
||||
let data = data.load_scalar(fx);
|
||||
|
Loading…
Reference in New Issue
Block a user