diff --git a/src/overflow.rs b/src/overflow.rs index 80aed998d737..c296961d1f0c 100644 --- a/src/overflow.rs +++ b/src/overflow.rs @@ -32,7 +32,7 @@ use crate::utils::{count_newlines, extra_offset, first_line_width, last_line_wid /// Organized as a list of `(&str, usize)` tuples, giving the name of the macro and the number of /// arguments before the format string (none for `format!("format", ...)`, one for `assert!(result, /// "format", ...)`, two for `assert_eq!(left, right, "format", ...)`). -const SPECIAL_MACRO_WHITELIST: &[(&str, usize)] = &[ +const SPECIAL_CASE_MACROS: &[(&str, usize)] = &[ // format! like macros // From the Rust Standard Library. ("eprint!", 0), @@ -60,7 +60,7 @@ const SPECIAL_MACRO_WHITELIST: &[(&str, usize)] = &[ ("debug_assert_ne!", 2), ]; -const SPECIAL_ATTR_WHITELIST: &[(&str, usize)] = &[ +const SPECIAL_CASE_ATTR: &[(&str, usize)] = &[ // From the `failure` crate. ("fail", 0), ]; @@ -182,10 +182,10 @@ impl<'a> OverflowableItem<'a> { } } - fn whitelist(&self) -> &'static [(&'static str, usize)] { + fn special_cases(&self) -> &'static [(&'static str, usize)] { match self { - OverflowableItem::MacroArg(..) => SPECIAL_MACRO_WHITELIST, - OverflowableItem::NestedMetaItem(..) => SPECIAL_ATTR_WHITELIST, + OverflowableItem::MacroArg(..) => SPECIAL_CASE_MACROS, + OverflowableItem::NestedMetaItem(..) => SPECIAL_CASE_ATTR, _ => &[], } } @@ -770,7 +770,7 @@ pub(crate) fn maybe_get_args_offset( ) -> Option<(bool, usize)> { if let Some(&(_, num_args_before)) = args .get(0)? - .whitelist() + .special_cases() .iter() .find(|&&(s, _)| s == callee_str) { diff --git a/src/test/mod.rs b/src/test/mod.rs index ab966d4a3607..4bad8e71481e 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -24,7 +24,7 @@ mod parser; const DIFF_CONTEXT_SIZE: usize = 3; // A list of files on which we want to skip testing. -const SKIP_FILE_WHITE_LIST: &[&str] = &[ +const FILE_SKIP_LIST: &[&str] = &[ // We want to make sure that the `skip_children` is correctly working, // so we do not want to test this file directly. "configs/skip_children/foo/mod.rs", @@ -90,7 +90,7 @@ where } fn is_file_skip(path: &Path) -> bool { - SKIP_FILE_WHITE_LIST + FILE_SKIP_LIST .iter() .any(|file_path| is_subpath(path, file_path)) }