Skip to content

Commit 6a85ce6

Browse files
committed
[review] skip_macro_names -> skip_macro_invocations
1 parent f1a397a commit 6a85ce6

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

Configurations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ macro_rules! foo {
10141014

10151015
See also [`format_macro_matchers`](#format_macro_matchers).
10161016

1017-
## `skip_macro_names`
1017+
## `skip_macro_invocations`
10181018

10191019
Skip formatting the bodies of macro invocations with the following names.
10201020

src/config/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ create_config! {
7070
format_macro_matchers: bool, false, false,
7171
"Format the metavariable matching patterns in macros";
7272
format_macro_bodies: bool, true, false, "Format the bodies of macros";
73-
skip_macro_names: MacroSelectors, MacroSelectors::default(), false,
73+
skip_macro_invocations: MacroSelectors, MacroSelectors::default(), false,
7474
"Skip formatting the bodies of macros invoked with the following names.";
7575
hex_literal_case: HexLiteralCase, HexLiteralCase::Preserve, false,
7676
"Format hexadecimal integer literals";
@@ -547,7 +547,7 @@ normalize_doc_attributes = false
547547
format_strings = false
548548
format_macro_matchers = false
549549
format_macro_bodies = true
550-
skip_macro_names = []
550+
skip_macro_invocations = []
551551
hex_literal_case = "Preserve"
552552
empty_item_single_line = true
553553
struct_lit_single_line = true
@@ -930,11 +930,11 @@ make_backup = false
930930
}
931931

932932
#[test]
933-
fn test_override_skip_macro_names() {
933+
fn test_override_skip_macro_invocations() {
934934
let mut config = Config::default();
935-
config.override_value("skip_macro_names", r#"["*", "println"]"#);
935+
config.override_value("skip_macro_invocations", r#"["*", "println"]"#);
936936
assert_eq!(
937-
config.skip_macro_names(),
937+
config.skip_macro_invocations(),
938938
MacroSelectors(vec![
939939
MacroSelector::All,
940940
MacroSelector::Name(MacroName::new("println".to_owned()))

src/visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ impl<'b, 'a: 'b> FmtVisitor<'a> {
772772
) -> FmtVisitor<'a> {
773773
let mut skip_context = SkipContext::default();
774774
let mut macro_names = Vec::new();
775-
for macro_selector in config.skip_macro_names().0 {
775+
for macro_selector in config.skip_macro_invocations().0 {
776776
match macro_selector {
777777
MacroSelector::Name(name) => macro_names.push(name.to_string()),
778778
MacroSelector::All => skip_context.all_macros = true,

tests/source/skip_macro_names.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-skip_macro_names: ["items"]
1+
// rustfmt-skip_macro_invocations: ["items"]
22

33
macro_rules! items {
44
($($arg:item)*) => { $($arg)* };

tests/source/skip_macro_names_all.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-skip_macro_names: ["*","items"]
1+
// rustfmt-skip_macro_invocations: ["*","items"]
22

33
macro_rules! items {
44
($($arg:item)*) => { $($arg)* };

tests/target/skip_macro_names.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-skip_macro_names: ["items"]
1+
// rustfmt-skip_macro_invocations: ["items"]
22

33
macro_rules! items {
44
($($arg:item)*) => { $($arg)* };

tests/target/skip_macro_names_all.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// rustfmt-skip_macro_names: ["*","items"]
1+
// rustfmt-skip_macro_invocations: ["*","items"]
22

33
macro_rules! items {
44
($($arg:item)*) => { $($arg)* };

0 commit comments

Comments
 (0)