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

pub fn extract_assert_macro_args<'tcx>(
    e: &'tcx Expr<'tcx>
) -> Option<Vec<&'tcx Expr<'tcx>>>
Expand description

Extract args from an assert-like macro. Currently working with:

  • assert!, assert_eq! and assert_ne!
  • debug_assert!, debug_assert_eq! and debug_assert_ne! For example: assert!(expr) will return Some([expr]) debug_assert_eq!(a, b) will return Some([a, b])