@@ -2357,7 +2357,7 @@ fn with_test_item_names(tcx: TyCtxt<'_>, module: LocalDefId, f: impl Fn(&[Symbol
23572357
23582358/// Checks if the function containing the given `HirId` is a `#[test]` function
23592359///
2360- /// Note: Add `// compile-flags: --test` to UI tests with a `#[test]` function
2360+ /// Note: Add `//@ compile-flags: --test` to UI tests with a `#[test]` function
23612361pub fn is_in_test_function ( tcx : TyCtxt < ' _ > , id : hir:: HirId ) -> bool {
23622362 with_test_item_names ( tcx, tcx. parent_module ( id) , |names| {
23632363 tcx. hir ( )
@@ -2379,7 +2379,7 @@ pub fn is_in_test_function(tcx: TyCtxt<'_>, id: hir::HirId) -> bool {
23792379
23802380/// Checks if the item containing the given `HirId` has `#[cfg(test)]` attribute applied
23812381///
2382- /// Note: Add `// compile-flags: --test` to UI tests with a `#[cfg(test)]` function
2382+ /// Note: Add `//@ compile-flags: --test` to UI tests with a `#[cfg(test)]` function
23832383pub fn is_in_cfg_test ( tcx : TyCtxt < ' _ > , id : hir:: HirId ) -> bool {
23842384 fn is_cfg_test ( attr : & Attribute ) -> bool {
23852385 if attr. has_name ( sym:: cfg)
@@ -2401,7 +2401,7 @@ pub fn is_in_cfg_test(tcx: TyCtxt<'_>, id: hir::HirId) -> bool {
24012401/// Checks whether item either has `test` attribute applied, or
24022402/// is a module with `test` in its name.
24032403///
2404- /// Note: Add `// compile-flags: --test` to UI tests with a `#[test]` function
2404+ /// Note: Add `//@ compile-flags: --test` to UI tests with a `#[test]` function
24052405pub fn is_test_module_or_function ( tcx : TyCtxt < ' _ > , item : & Item < ' _ > ) -> bool {
24062406 is_in_test_function ( tcx, item. hir_id ( ) )
24072407 || matches ! ( item. kind, ItemKind :: Mod ( ..) )
0 commit comments