clippy_utils

Function is_cfg_test

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

Checks if id has a #[cfg(test)] attribute applied

This only checks directly applied attributes, to see if a node is inside a #[cfg(test)] parent use is_in_cfg_test