about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCaleb Cartwright <caleb.cartwright@outlook.com>2024-07-28 18:58:38 -0500
committerCaleb Cartwright <calebcartwright@users.noreply.github.com>2024-07-28 19:37:36 -0500
commitcf352a766fc6c796e33acca5261d1be6a3955bbb (patch)
tree2a7941302e87d8734bd19f4e44d8cadb19621f9c
parentd66ab31b535a293d9d47bbbaeb6e8733bf0375db (diff)
downloadrust-cf352a766fc6c796e33acca5261d1be6a3955bbb.tar.gz
rust-cf352a766fc6c796e33acca5261d1be6a3955bbb.zip
chore: apply review suggestions
-rw-r--r--Configurations.md2
-rw-r--r--src/config/config_type.rs4
-rw-r--r--src/overflow.rs8
3 files changed, 9 insertions, 5 deletions
diff --git a/Configurations.md b/Configurations.md
index ec95c82fdb1..b1f54060392 100644
--- a/Configurations.md
+++ b/Configurations.md
@@ -2698,7 +2698,7 @@ Controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338]
 
 - **Default value**: `"2015"`
 - **Possible values**: `"2015"`, `"2018"`, `"2021"`, `"2024"` (unstable variant)
-- **Stable**: Yes
+- **Stable**: No
 
 [Rust Style Guide]: https://doc.rust-lang.org/nightly/style-guide/
 [RFC 3338]: https://rust-lang.github.io/rfcs/3338-style-evolution.html
diff --git a/src/config/config_type.rs b/src/config/config_type.rs
index 43f014764c9..91efb71744b 100644
--- a/src/config/config_type.rs
+++ b/src/config/config_type.rs
@@ -581,8 +581,8 @@ macro_rules! create_config {
                 if self.was_set().style_edition() || self.was_set_cli().style_edition() {
                     eprintln!(
                         "Warning: the deprecated `version` option was \
-                        used in conjunction with the `edition` or \
-                        `style_edition` options which take precedence. \
+                        used in conjunction with the `style_edition` \
+                        option which takes precedence. \
                         The value of the `version` option will be ignored."
                     );
                 } else if matches!(self.version(), Version::Two) {
diff --git a/src/overflow.rs b/src/overflow.rs
index 368a8aaec75..510ad3c642e 100644
--- a/src/overflow.rs
+++ b/src/overflow.rs
@@ -200,8 +200,12 @@ impl<'a> OverflowableItem<'a> {
             OverflowableItem::NestedMetaItem(..) => SPECIAL_CASE_ATTR,
             _ => &[],
         };
-        let additional_cases = match (self, config.style_edition()) {
-            (OverflowableItem::MacroArg(..), StyleEdition::Edition2024) => SPECIAL_CASE_MACROS_V2,
+        let additional_cases = match self {
+            OverflowableItem::MacroArg(..)
+                if config.style_edition() >= StyleEdition::Edition2024 =>
+            {
+                SPECIAL_CASE_MACROS_V2
+            }
             _ => &[],
         };
         base_cases.iter().chain(additional_cases)