143}
144
145▶/// Checks if the given expression is a macro call to `todo!()` or `unimplemented!()`.
146pub fn is_todo_unimplemented_macro(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
147 root_macro_call_first_node(cx, expr)
· · ·
146▶pub fn is_todo_unimplemented_macro(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
147 root_macro_call_first_node(cx, expr)
148 .and_then(|macro_call| cx.tcx.get_diagnostic_name(macro_call.def_id))
· · ·
149▶ .is_some_and(|macro_name| matches!(macro_name, sym::todo_macro | sym::unimplemented_macro))
150}
151
· · ·
152▶/// Checks if the given expression is a stub, i.e., a `todo!()` or `unimplemented!()` expression,
153/// or a block whose last expression is a `todo!()` or `unimplemented!()`.
154pub fn is_todo_unimplemented_stub(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
· · ·
153▶/// or a block whose last expression is a `todo!()` or `unimplemented!()`.
154pub fn is_todo_unimplemented_stub(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
155 if let ExprKind::Block(block, _) = expr.kind {
+ 7 more matches in this file