Skip to content

Commit acb6f1a

Browse files
authored
Rollup merge of rust-lang#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.
2 parents fcb86c8 + 65f7789 commit acb6f1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/intrinsics/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use rustc_middle::ty::layout::{HasParamEnv, ValidityRequirement};
2323
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
2424
use rustc_middle::ty::GenericArgsRef;
2525
use rustc_span::source_map::Spanned;
26-
use rustc_span::symbol::{kw, sym, Symbol};
26+
use rustc_span::symbol::{sym, Symbol};
2727

2828
pub(crate) use self::llvm::codegen_llvm_intrinsic_call;
2929
use crate::prelude::*;
@@ -1132,7 +1132,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
11321132
ret.write_cvalue(fx, val);
11331133
}
11341134

1135-
kw::Try => {
1135+
sym::catch_unwind => {
11361136
intrinsic_args!(fx, args => (f, data, catch_fn); intrinsic);
11371137
let f = f.load_scalar(fx);
11381138
let data = data.load_scalar(fx);

0 commit comments

Comments
 (0)