From 567b07c9e693758b3f4607573a2f276f43116f7b Mon Sep 17 00:00:00 2001 From: Pulkit Goyal <7895pulkit@gmail.com> Date: Tue, 16 Jan 2018 19:00:42 +0530 Subject: [PATCH] rename parse_cfg_prefix() to has_cfg_prefix() The function parse_cfg_prefix() is not really parsing. It's just checking whether the prefix is present or not. So the new function name as suggested by @Mark-Simulacrum is better. --- src/tools/compiletest/src/header.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 478a692df91..a10372fd745 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -44,7 +44,7 @@ impl EarlyProps { props.ignore = props.ignore || config.parse_cfg_name_directive(ln, "ignore") || - (config.parse_cfg_prefix(ln, "only") && + (config.has_cfg_prefix(ln, "only") && !config.parse_cfg_name_directive(ln, "only")) || ignore_gdb(config, ln) || ignore_lldb(config, ln) || @@ -566,7 +566,7 @@ impl Config { } } - fn parse_cfg_prefix(&self, line: &str, prefix: &str) -> bool { + fn has_cfg_prefix(&self, line: &str, prefix: &str) -> bool { // returns whether this line contains this prefix or not. For prefix // "ignore", returns true if line says "ignore-x86_64", "ignore-arch", // "ignore-andorid" etc.