From e7e58a02b3728f8ad2755b6bdff816d1f5910ebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Sat, 24 Feb 2024 19:38:34 +0000 Subject: [PATCH] Don't check Makefile directives --- src/tools/compiletest/src/header.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 52102e939f7ec..abfb89641bf92 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -973,7 +973,8 @@ fn iter_header( directive: original_directive_line, }); continue; - } else { + // Too prone to false positives to handle Makefile `#` directives...1 + } else if testfile.extension().is_some_and(|e| e == "rs") { *poisoned = true; eprintln!( "error: detected unknown compiletest test directive `{}` in {}:{}", @@ -997,7 +998,7 @@ fn iter_header( directive: original_directive_line, }); continue; - } else { + } else if testfile.extension().is_some_and(|e| e == "rs") { *poisoned = true; eprintln!( "error: detected unknown compiletest test directive `{}` in {}:{}",