Skip to content

Commit cf352a7

Browse files
chore: apply review suggestions
1 parent d66ab31 commit cf352a7

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Configurations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2698,7 +2698,7 @@ Controls the edition of the [Rust Style Guide] to use for formatting ([RFC 3338]
26982698

26992699
- **Default value**: `"2015"`
27002700
- **Possible values**: `"2015"`, `"2018"`, `"2021"`, `"2024"` (unstable variant)
2701-
- **Stable**: Yes
2701+
- **Stable**: No
27022702

27032703
[Rust Style Guide]: https://doc.rust-lang.org/nightly/style-guide/
27042704
[RFC 3338]: https://rust-lang.github.io/rfcs/3338-style-evolution.html

src/config/config_type.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ macro_rules! create_config {
581581
if self.was_set().style_edition() || self.was_set_cli().style_edition() {
582582
eprintln!(
583583
"Warning: the deprecated `version` option was \
584-
used in conjunction with the `edition` or \
585-
`style_edition` options which take precedence. \
584+
used in conjunction with the `style_edition` \
585+
option which takes precedence. \
586586
The value of the `version` option will be ignored."
587587
);
588588
} else if matches!(self.version(), Version::Two) {

src/overflow.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,12 @@ impl<'a> OverflowableItem<'a> {
200200
OverflowableItem::NestedMetaItem(..) => SPECIAL_CASE_ATTR,
201201
_ => &[],
202202
};
203-
let additional_cases = match (self, config.style_edition()) {
204-
(OverflowableItem::MacroArg(..), StyleEdition::Edition2024) => SPECIAL_CASE_MACROS_V2,
203+
let additional_cases = match self {
204+
OverflowableItem::MacroArg(..)
205+
if config.style_edition() >= StyleEdition::Edition2024 =>
206+
{
207+
SPECIAL_CASE_MACROS_V2
208+
}
205209
_ => &[],
206210
};
207211
base_cases.iter().chain(additional_cases)

0 commit comments

Comments
 (0)