Function clippy_utils::ast_utils::extract_assert_macro_args[−][src]

pub fn extract_assert_macro_args(expr: &Expr) -> Option<[&Expr; 2]>
Expand description

Extract args from an assert-like macro.

Currently working with:

  • assert_eq! and assert_ne!
  • debug_assert_eq! and debug_assert_ne!

For example:

debug_assert_eq!(a, b) will return Some([a, b])