pub fn is_in_test_function(tcx: TyCtxt<'_>, id: HirId) -> bool
Checks if the function containing the given HirId is a #[test] function
HirId
#[test]
Note: Add //@compile-flags: --test to UI tests with a #[test] function
//@compile-flags: --test