Function clippy_utils::is_test_module_or_function

source ·
pub fn is_test_module_or_function(tcx: TyCtxt<'_>, item: &Item<'_>) -> bool
Expand description

Checks whether item either has test attribute applied, or is a module with test in its name.

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