- // check for `begin_panic`
- if_chain! {
- if let ExprKind::Call(func_expr, _) = expr.kind;
- if let ExprKind::Path(QPath::Resolved(_, path)) = func_expr.kind;
- if let Some(path_def_id) = path.res.opt_def_id();
- if match_panic_def_id(self.lcx, path_def_id);
- if is_expn_of(expr.span, "unreachable").is_none();
- then {
+ if let Some(macro_call) = root_macro_call_first_node(self.lcx, expr) {
+ if is_panic(self.lcx, macro_call.def_id) {