clippy_utils

Function is_in_test_function

Source
pub fn is_in_test_function(tcx: TyCtxt<'_>, id: HirId) -> bool
Expand description

Checks if the function containing the given HirId is a #[test] function

Note: Add //@compile-flags: --test to UI tests with a #[test] function